LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Iptables nat (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-nat-4175550806/)

mukeshlinux1709 08-14-2015 10:30 PM

Iptables nat
 
My organization network range is 10.1.50.x
i want to communicate with another outside network of our client
i build one IPTABLE server
client given me natted ip of his network 3.3.3.2
now my iptable server has 2 NIC card
eth0=10.1.50.26
netmask=255.255.255.0
no gateway assigned
eth1=3.3.3.2
netmask=255.255.255.248
gateway=3.3.3.1
tel me how nat this scenario?

now after this client given 2 more natted ip 172.16.25.16 & 172.16.29.16

now tel me how to nat?
should i create ip aliasing?
does iptables support virtual NIC or ip aliasing?

polaris96 08-15-2015 01:04 PM

What are you trying to do? If he gave you three ipv4 adrs and you want to communicate set your iptable chaind to ALLOW those adrs and your routing table to asociate them with a particular interface (if youbwant to)

I don't underStand where NAT is required.

jpollard 08-17-2015 03:06 AM

Quote:

Originally Posted by polaris96 (Post 5406243)
What are you trying to do? If he gave you three ipv4 adrs and you want to communicate set your iptable chaind to ALLOW those adrs and your routing table to asociate them with a particular interface (if youbwant to)

I don't underStand where NAT is required.

It is called a router/firewall (though the OP didn't say that). NAT is used to translate the 10.x addresses (which are non-routable) into one of the IPv4 routeable addresses (plus an associated port) to allow the hosts behind the router to access the internet.

Now, how to set things up depends on the distribution being used. Current RH uses a daemon service to provide the interface...


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