LinuxQuestions.org
Help answer threads with 0 replies.
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 07-07-2004, 01:57 AM   #1
jimmax777
LQ Newbie
 
Registered: Aug 2003
Location: Mumbai, India
Distribution: Red Hat 9
Posts: 26

Rep: Reputation: 15
Routing problem


Hi All Linux and Network Experts,

I am quite a newbie in Networking, especially where more than one nic's are present, I face problems with routing.

Now I will explain my problem:

My company is very small scale with 30 PC's connected via hardware ADSL router. Now I am assigned an IP dynamically by my ISP to my Hardware Router which is a CNET Router. The router connected to the switch works just fine for the entire network. Now I want to protect my network by letting the router connect to the Firewall Machine which is a Compaq Pro Liant ML350 machine with 2 Lan Cards eth0 and eth1.

Now I am connecting the hardware router to the eth0 with IP of eth0 as 10.0.0.1 subnet mask 255.0.0.0 and the router address as 10.0.0.254 subnetmask 255.0.0.0. Here the default gateway for eth0 is 10.0.0.254, i.e. the hardware router address.

Thats working fine and I am getting internet on my Compaq Server. Now I am connecting my eth1 to my LAN network with IP for eth1 192.168.1.1 and subnet 255.255.255.0 and for the network of 192.168.1.0. The gateway for eth1 is 10.0.0.1 i.e. the eth0 interface.

The machines on the LAN are able to ping to my compaq proliant server on both the interfaces i.e. eth0 with 10.0.0.1 and eth1 with 192.168.1.1 but cannot ping 10.0.0.254 i.e. the hardware router. The machines on the LAN are also not able to use the internet. Can somebody guide me as to what is the solution to this problem? I want some advice as to do I need to do some other settings or some routes or what I dont know.

Please reply as soon as possible as I want to start implementing this fast. Previously it was just a Windows OS and used to do nothing but now I want to use this server for better purpose in the office to make use of the resource and also can implement some other services like FTP and MAIL for my office. Please advice.


Thanks for the patience in looking into this problem.

Jimmax
 
Old 07-07-2004, 02:06 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
First, you may only have one default gateway. Your internal NIC config file should not have a gateway.

Second, did you enable IP forwarding? Did you enable IPmasquerade (or does your router handle this?)?
 
Old 07-07-2004, 02:49 AM   #3
jimmax777
LQ Newbie
 
Registered: Aug 2003
Location: Mumbai, India
Distribution: Red Hat 9
Posts: 26

Original Poster
Rep: Reputation: 15
Hi Thnx for the response,

How do I enable IP Masquerading?? I have enabled IP Forwarding though in the /etc/sysctl.conf file. Please advice how to enable IP Masquerading. I have IP Tables installed but dont know anything about IP Tables rules and stuff which also I want to learn and have tried looking at some places but its all quite complex to start with. so please can you advice me as to how should I do that?

THanx.

Jimmax
 
Old 07-07-2004, 04:41 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
iptables -t filter -A FORWARD -i eth1 -o eth0 -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED

iptables -t nat -A POSTROUTING -i eth1 -o eth0 -j MASQUERADE
 
Old 07-07-2004, 04:53 AM   #5
jimmax777
LQ Newbie
 
Registered: Aug 2003
Location: Mumbai, India
Distribution: Red Hat 9
Posts: 26

Original Poster
Rep: Reputation: 15
You cant use -i with POSTROUTING

Hi there,

It is giving an error stating

[root@advantage root]# iptables -t nat -A POSTROUTING -i eth1 -o eth0 -j MASQUERADE
iptables v1.2.7a: Can't use -i with POSTROUTING

Try `iptables -h' or 'iptables --help' for more information.

now what should I do???

please advice.

Thanx

Jimmy
 
Old 07-07-2004, 05:25 AM   #6
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
sorry, remove the -i eth1 from the POSTROUTING line
 
  


Reply


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 problem DRagonRage Debian 8 09-21-2005 03:29 PM
routing problem DRagonRage Linux - Networking 1 09-21-2005 01:02 PM
Routing problem Infernal211283 Linux - Networking 3 02-28-2005 02:59 AM
Another Routing problem Bambi Linux - Networking 2 06-03-2004 03:13 PM
routing problem nowonmai Linux - Networking 2 10-09-2003 07:59 AM

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

All times are GMT -5. The time now is 02:47 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration