LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IpTables port forwarding works but cant get out (https://www.linuxquestions.org/questions/linux-networking-3/iptables-port-forwarding-works-but-cant-get-out-8431/)

acdcbag 11-07-2001 09:50 PM

IpTables port forwarding works but cant get out
 
I have set up a firewall using IPtables and have successfully gotten traffic on a port to go through the linux gateway to the internal web server. The gateway machine seems to have full allowed access, I can reach it remotely, it can ping the outside, email gets to it and users receive their email from it. The problem is with the internal machine it can get to any of the machines we have in our building, internal ip's and also external ip's. but when I try to leave our subnet it fails.

phek 11-08-2001 03:48 PM

make sure your iptables has this line

iptables -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source $INET_IP


All times are GMT -5. The time now is 02:06 PM.