DNAT and MASQUERADE

DNAT and MASQUERADE

Erez D erez0001 at gmail.com
Wed Jan 7 10:16:45 IST 2015


hello.

I have an iptables question

i have the following

ext_ip -> NAT1 -> linux firewall-> network -> computer1:eth0 .. computer99

i have no control over NAT1.
computer1 also can reach the internet via eth1.

linux firewall redirects incoming port 7777 from ext_ip to computer1
however i need coputer2 .. computer99 to connect to ext_ip:7777 and also
reach computer1

so first i did a NAT rule in linux firewall to redirect all packets from
internal to ext_ip:7777  to computer1. and did an 'ifconfig eth0:1 $ext_ip
up' on computer1.
this works. however it causes computer1 not to be able to access real
ext_ip via eth1 which is connected to the internet as well

so i though of both doing DNAT and MASQ, which will do the same but will
not require assiging ext_ip to computer1.
howerver i do not know how to do that

anyone ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20150107/fb2ad946/attachment.html>


More information about the Linux-il mailing list