LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-17-2003, 04:46 AM   #1
dunmarie
Member
 
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: 10.xx.xxx.x and on the other a Router connecting to the Internet with a public IP: 196.xx.xxx.xxx.
My firewall, to be, has been setup with one nic (eth1) with IP: 10.xx.xxx.xxx to match my private network and on the other nic (eth0) with a public IP: 196.xx.xxx.xxx.
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:

ifcfg-eth0:
DEVICE=eth0
IPADDR=196.xx.xxx.xxx
NETMASK=255.xxx.xxx.xxx
NETWORK=196.xx.xxx.xxx
BROADCAST=196.xx.xxx.xxx
ONBOOT=yes

ifcfg-eth1:
DEVICE=eth1
IPADDR=10.xx.xxx.xxx
NETMASK=255.xxx.xxx.xxx
NETWORK=10.xx.xxx.xxx
BROADCAST=10.xx.xxx.xxx
GATEWAY=196.xx.xxx.xxx (eth0)
ONBOOT=yes

route:
196.xx.xxx.x * 255.xxx.xxx.x eth0
10.xx.xxx.x * 255.xxx.xxx.x eth1
127.0.0.0 * 255.0.0.0 lo
default 196.xx.xxx.xxx 0.0.0.0 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, 09:23 AM   #2
Paul_assheton
Member
 
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.

/etc/sysconfig/network

This is where I turn on masquerading with the following line

FORWARD_IPV4=yes

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

Paul
 
Old 09-17-2003, 10:17 AM   #3
Mathieu
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.
http://www.linuxquestions.org/questi...threadid=82005
 
Old 09-17-2003, 12:23 PM   #4
ehpserver
Member
 
Registered: Sep 2003
Posts: 38

Rep: Reputation: 15
Thumbs up

HI,
Very easy to setp using http://firestarter.sf.net/

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

 
Old 09-17-2003, 12:39 PM   #5
win32sux
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:

http://morizot.net/firewall/gen/
 
Old 09-17-2003, 12:52 PM   #6
ehpserver
Member
 
Registered: Sep 2003
Posts: 38

Rep: Reputation: 15
Hi win32sux ,

Nice link
 
Old 09-18-2003, 06:19 AM   #7
dunmarie
Member
 
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.
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:23 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