Linux iptables maps multiple Intranet ftp servers in nat

Source: Internet
Author: User

Let's take a look.Linux iptablesAdd multipleFtpThe specific method of server ing.

The following two steps are involved:

1. First, convert the source addresses of the three ftp servers to those of the gateway.

192.168.0.254 is the gateway 10.0.0.0/24 is the network segment

Iptables-t nat-a postrouting-s 10.0.0.0/24 -- sport 20, 21-j SNAT -- to-source 192.168.0.254

If the gateway is a dynamic IP address

Iptables-t nat-a postrouting-s 10.0.0.0/24 -- sport 20, 21-j MASQUERADE

2. Convert the gateway Source Address to the Internet address

Iptables -- table nat -- append POSTROUTING-s 192.168.0.254-j SNAT -- to *. * (Public IP address published on the Internet)

3. Integration with dns

Iptables-t nat-a postrouting-s 10.0.0.0/24 -- sport 53-j SNAT -- to-source DNS Server IP

Through the article, we can easily see that the Linux iptables process is very simple to map multiple ftp servers in the nat network.

  • Linux Iptables kernel added time module
  • Linux Firewall Iptables entry notes
  • Linux Iptables syntax
  • Use iptables for static IP ing
  • How to map all the Internet ports of iptables to a host on the Intranet
  • Configure the Linux kernel and use iptables for port ing
  • Specific iptables port ing operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.