Enable SNAT with IPTABLES on FC5
I have this setup on my FC5 machine.
WAN Interface (eth1) IP: 10.12.69.3 Mask: 255.255.255.0 GW: 10.12.69.2 LAN Interface (eth0) IP: 192.168.1.3 Mask: 255.255.255.0 I want to enable NAT with iptables on this machine. And to host service on port 25 and 110 where internet users can access the service. I have enabled port forwarding on my router to 192.168.1.3 I greatly appreciate if anyone could help me with this. Thanks in advance. |
Try this iptables rule to enable NAT for 192.168.1.0 network:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE make sure that 'nat' table is flushed (iptables -t nat -L) or flush it by command 'iptables -t nat -F'. After NAT is enabled just put 192.168.1.3 as default gateway entry at 192.168.1.0 network subscribers' PCs. Good luck! |
Does not your router already support masquerading if you're using privates on that email box?
|
I want to create SNAT. Not masquerade.
|
iptables -t nat -a POSTROUTING -o $WAN -j SNAT --to $WANIP
However, I suspect if your router is a masquerading to your private addressed server you've still more work ahead of yourself. |
Quote:
|
All times are GMT -5. The time now is 04:13 AM. |