Results 1 to 1 of 1
I am trying to FTP forward from one machine to another. This is my configuration for the network:
1st machine : 2NICs : eth0 ( 172.17.121.146 - external) , eth1 ...
- 06-06-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 1
Iptables FTP Forward Ubuntu
I am trying to FTP forward from one machine to another. This is my configuration for the network:
1st machine : 2NICs : eth0 ( 172.17.121.146 - external) , eth1 (192.168.0.10 - internal)
2nd machine (FTP server) : 1NIC : eth0 (192.168.0.12 - internal)
Code for forwarding:
#!/bin/bash
iptables="sbin/iptables"
#Flush any existing tables:
iptables -F
iptables -t nat -F
#FTP forwaridng
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 172.17.121.146 --dport 21 -j DNAT --to 192.168.0.12:21
iptables -A FORWARD -p tcp -i eth0 -o eth1 -d 192.168.0.10 --dport 21 -j ACCEPT
Can anyone please tell me what is wrong or what am I missing?


Reply With Quote