LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2015, 10:30 PM   #1
mukeshlinux1709
LQ Newbie
 
Registered: Aug 2015
Posts: 1

Rep: Reputation: Disabled
Question 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?
 
Old 08-15-2015, 01:04 PM   #2
polaris96
Member
 
Registered: Jan 2015
Distribution: Slackware, LFS, OpenIndiana, debian wheezy
Posts: 55

Rep: Reputation: Disabled
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.
 
Old 08-17-2015, 03:06 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by polaris96 View Post
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables nat lax.rawat07 Linux - Newbie 8 08-27-2012 07:41 AM
IPTables 1:1 NAT Garak Linux - Security 13 12-19-2011 05:03 PM
iptables: can't initialize iptables table `NAT' linuxgentoo Linux - Kernel 3 01-17-2010 10:15 AM
Iptables nat keyboard1973 Linux - Newbie 1 12-17-2008 06:30 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration