Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-29-2009, 07:28 PM   #1
Registered: Mar 2009
Posts: 65

Rep: Reputation: 15
Forward traffic from internal NIC to external NIC

Hi all,

I have a (virtual) server with 3 NIC's: 1 external (inet), 1 local and 1 DMZ. This server is my gateway.
I would like my internal network, where every server has a static 192.168.0.x IP, to access the internet via the gateway.
That means the traffic has to pass from the 'local' NIC to the 'external' NIC, connected to the internet.
Which setting do I change to accomplish this ?

Please check the sceenshot (attachment) for my current setup

Thanks in advance!
Attached Thumbnails
Click image for larger version

Name:	interfaces.jpg
Views:	22
Size:	112.9 KB
ID:	1105  
Old 07-30-2009, 05:25 AM   #2
Registered: Mar 2009
Posts: 65

Original Poster
Rep: Reputation: 15
No one?! Thx
Old 07-30-2009, 05:39 AM   #3
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

Use iptables to do this. Google gives you more info on how to do this.

Kind regards,

Old 07-30-2009, 06:02 AM   #4
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
It sounds like you want routing in Server. for static routing you can use 'ip route ' command. If you want dynamic routing quagga daemon can help you

Old 07-30-2009, 11:53 AM   #5
Senior Member
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,314

Rep: Reputation: 98
It appears that iptables would be the appropriate thing to use, you need to set up a rule that forwards traffic for the outside network to the NIC that goes to the internet.

There are a host of front ends that might be able to set it up for you though, I think webmin can generate the rules for instance.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to forward traffic to one subdomain do a different internal IP. E211 Linux - Server 3 06-11-2008 12:27 AM
1 internal 1 external nic neocontrol Linux - Networking 4 02-14-2007 01:53 PM
nic reads traffic of other nic? Red Squirrel Linux - Networking 2 09-04-2006 02:07 PM
2 External Nic, 1 Internal Nic Router Problem trevanda Linux - Networking 0 10-13-2004 02:20 AM
2 NIC problem, no internal ping, only external browny_amiga Linux - Networking 3 12-02-2002 02:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:13 AM.

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