Ip Masq
I have a private FTP server in my home PC which I use to share some documents with my partner who live at more than 1000 milles
I have another PC with RH 7.3 (who have the connection to my ISP) and I'm using IPtables to shared the connection, the problem is that when I request access to the FTP I get a "connection refused" message.
I think that's because the RH box its taking the FTP call, and since there's not an FTP server there, it denied it.
I created this
Code:
IPTABLES="/sbin/iptables" EXTIF="ppp0" EXTIP="`ifconfig $EXTIF | grep inet | cut -d : -f 2 | cut -d \ -f 1`" if [ "$EXTIP" = '' ]; then echo "Aborting: Unable to determine the IP-address of $EXTIF !" exit 1 fi echo External IP: $EXTIP $IPTABLES -A INPUT -p tcp --dport 24 -j ACCEPT $IPTABLES -A PREROUTING -t nat -i $EXT_IF -p tcp -d $INTERNET_IP --dport 24 -j DNAT --to 192.168.0.1:24
Any Idea of what's wrong?
192.168.0.1 its the internal Ip of the PC with MS XP, and ppp0 its my connection to my ISP, and the FTP server its running in the port 24.