Linux ftp port forwarding and modify

First, the forward
ftp port forwarding:
View port forwarding rules:
iptables -t NAT -L -n
add port forwarding rules:
iptables -t -d 172.17.10.119 NAT the -I PREROUTING -p tcp -j DNAT --to --dport 2110 172.17.10.119:21
delete port forwarding rules:
iptables -t -D PREROUTING NAT 1

Reference Description:

Linux ftp port forwarding and modify

Second, modify the port
root user enters
an edit /etc/vsftpd/vsftpd.conf, the last line listen_port = 2110
Operation Command:
Vim /etc/vsftpd/vsftpd.conf

2, edit / etc / services file, wherein the
ftp 21 / tcp to 2110. FTP / TCP
FTP 21 is / UDP to ftp 2110 / udp
operation command:
Vim / etc / services

3, restart the vsftpd service
Operation Command:
Service vsftpd restart

Guess you like

Origin blog.51cto.com/xuanxy/2427728