Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-17-2003, 05:46 AM   #1
Registered: Aug 2003
Location: Johannesburg, South Africa
Distribution: RedHat 9.0; SmoothWall Express
Posts: 43

Rep: Reputation: 15
Routing to Internet

I am setting up a firewall in Linux using Redhat 9.0 (command line). I have loaded the standard "Servers" installation and installed two network cards.
On the one side my private network with IP: and on the other a Router connecting to the Internet with a public IP:
My firewall, to be, has been setup with one nic (eth1) with IP: to match my private network and on the other nic (eth0) with a public IP:
The firewall software has been set to no firewall in order for me to get the routing right. From the firewall, to be, I can ping my private network as well as the Internet. No problem.
From my private network, with Windows XP and gateway set to my firewall eth0 IP I can ping both nics, but I can't ping the Router nor the Internet.
The following settings has been done:


DEVICE=eth1 (eth0)

route: * eth0 * eth1 * lo
default eth0

Iptables is setup to ACCEPT FORWARD
In sysctl.conf the line net.ipv4.ip_forward = 1 is set.

Is there something I am missing?
I can't find anything in the HOWTO's. I am sure it must be something simple.

Will I be able to use this Linux box to setup a VPN and Proxy as well?
It is a PIII 600MHz with 128MB ram.
Any help will be appreciated.
Thanks in advance.
Old 09-17-2003, 10:23 AM   #2
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Rep: Reputation: 15
The only thing I can think of is there is another place where you can set the ip forwarding.


This is where I turn on masquerading with the following line


Note that this is on a server running RH7.3 not RH9

Old 09-17-2003, 11:17 AM   #3
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
You need to set up Masquerading, take a look at this thread.
Old 09-17-2003, 01:23 PM   #4
Registered: Sep 2003
Posts: 38

Rep: Reputation: 15
Thumbs up

Very easy to setp using

with 3 to 4 mose clicks you can do what you want.

Old 09-17-2003, 01:39 PM   #5
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
or you can generate a decent customized iptables script right on this webpage:
Old 09-17-2003, 01:52 PM   #6
Registered: Sep 2003
Posts: 38

Rep: Reputation: 15
Hi win32sux ,

Nice link
Old 09-18-2003, 07:19 AM   #7
Registered: Aug 2003
Location: Johannesburg, South Africa
Distribution: RedHat 9.0; SmoothWall Express
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for everybody's help.
I got it going with the thread from Mathieu.

But I will definetly look at win32sux's link. It looks cool.


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
Routing internet to windows Maiios Linux - Networking 13 03-03-2004 06:18 PM
routing two NICs to internet pero Linux - Networking 4 01-09-2004 05:36 PM
Network routing of Internet jester_69 Linux - Networking 3 12-03-2003 01:18 PM
Internet Connection Routing? MythX Linux - Networking 1 10-20-2003 10:00 PM
Internet, routing and bridge Gorchi Linux - Networking 3 03-01-2003 10:29 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:50 PM.

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
Open Source Consulting | Domain Registration