Iptables port ing and vsftp security check 425 Security Solution

Source: Internet
Author: User

128.30.14.221 is a public IP address, 128.30.14.233 is a private IP address, and a normal Web server is set up on 233. Objective: To open a Web port 88 on 221 and map it to 80 on 233

------- Ing Web port ------

service iptables stopiptables -Xecho 1 >/proc/sys/net/ipv4/ip_forward/sbin/modprobe iptable_natiptables -t nat -A PREROUTING -d 128.30.14.221 -p tcp -m tcp --dport 88 -j DNAT --to-destination 128.30.14.233:80iptables -t nat -A POSTROUTING -d 128.30.14.233 -p tcp --dport 80 -j MASQUERADEservice iptables saveservice iptables start



Open the browser and enter http: // 128.30.14.221: 88. The webpage is displayed normally.


-------- Ing FTP port -------

128.30.14.221 is a public IP address, 128.30.14.233 is a private IP address, and a normal FTP server is set up on 233. Objective: To open a port 88 on 221 and map it to port 21 on 233.

Run script on 221:

service iptables stopiptables -Xecho 1 >/proc/sys/net/ipv4/ip_forward/sbin/modprobe iptable_natiptables -t nat -A PREROUTING -d 128.30.14.221 -p tcp -m tcp --dport 88 -j DNAT --to-destination 128.30.14.233:21iptables -t nat -A POSTROUTING -d 128.30.14.233 -p tcp --dport 21 -j MASQUERADEservice iptables saveservice iptables start


When FTP or CuteFTP is connected to 128.30.14.221: 88, remember to use PASV passive mode, but still encounter 425 security error. At this time, you need to run the script on the 233 Server:

/Sbin/modprobe ip_conntrack_ftp
/Sbin/modprobe ip_nat_ftp


Try again. Everything is normal.


Iptables port ing and vsftp security check 425 Security Solution

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.