LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-08-2004, 12:28 PM   #1
thirumala
LQ Newbie
 
Registered: Mar 2004
Location: USA
Posts: 18

Rep: Reputation: 0
Question routing setup


Hi,

I want to setup a router on linux PC for testing with NISTNet with the following config:


GW-------SW[lan]-------------[eth0 linux box with redhat 9.0 eth1]--------client pc

Eth0: 192.168.10.40 with 192.165.10.0 network
Router/GW: 192.168.10.1

Eth1: 192.168.20.1 with 192.168.20.0 network

Client PC: 192.168.20.25 with gateway set to 192.168.20.1



I have enabled IP-forwarding using
echo "1" > /proc/sys/net/ipv4/ip_forward

And

FORWARD_IPV4=yes in sysctl.conf file.


At present I am able to ping from linux box towards both sides but not from client pc to GW or clients on lan to client pc.

I want to route any type of traffic between eth0 and eth1 without any filters {for NIST Net testing]. What do I need to do?

What is the basic iptables script to achieve this?

anybody, please help me out with this problem.

Thanks,
Thiru
 
Old 04-08-2004, 02:51 PM   #2
paijm021
LQ Newbie
 
Registered: Apr 2004
Location: Germany
Distribution: Slackware 9.1
Posts: 20

Rep: Reputation: 0
routing with linux is a dream comming true. (compared with M$) :^)
 
Old 04-08-2004, 03:01 PM   #3
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
Did you compile routing into the kernel? Not always there by default.
 
Old 04-09-2004, 09:17 AM   #4
thirumala
LQ Newbie
 
Registered: Mar 2004
Location: USA
Posts: 18

Original Poster
Rep: Reputation: 0
Re: routing setup

Quote:
Originally posted by thirumala
Hi,

I want to setup a router on linux PC for testing with NISTNet with the following config:


GW-------SW[lan]-------------[eth0 linux box with redhat 9.0 eth1]--------client pc

Eth0: 192.168.10.40 with 192.165.10.0 network
Router/GW: 192.168.10.1

Eth1: 192.168.20.1 with 192.168.20.0 network

Client PC: 192.168.20.25 with gateway set to 192.168.20.1



I have enabled IP-forwarding using
echo "1" > /proc/sys/net/ipv4/ip_forward

And

FORWARD_IPV4=yes in sysctl.conf file.


At present I am able to ping from linux box towards both sides but not from client pc to GW or clients on lan to client pc.

I want to route any type of traffic between eth0 and eth1 without any filters {for NIST Net testing]. What do I need to do?

What is the basic iptables script to achieve this?

anybody, please help me out with this problem.

Thanks,
Thiru


Hi,
any help from anybody!


thanks,
Thiru
 
Old 04-09-2004, 09:32 AM   #5
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
stop iptables.

or delete rules:
iptables -F

so it will become a router without filter. what's your distro?

Last edited by maxut; 04-09-2004 at 09:47 AM.
 
Old 04-09-2004, 12:49 PM   #6
thirumala
LQ Newbie
 
Registered: Mar 2004
Location: USA
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by maxut
stop iptables.

or delete rules:
iptables -F

so it will become a router without filter. what's your distro?
thanks for the reply, please have a look at below explanation:

Setup:


LAN-------SW-------------[eth0 linux box with redhat 9.0 eth1]--------client pc

Eth0: 192.168.10.40 with 192.165.10.0 network
Router/GW: 192.168.10.1

Eth1: 192.168.20.1 with 192.168.20.0 network

Client PC: 192.168.20.25 with gateway:192.168.20.1


I want to route any type of traffic between eth0 and eth1.

Here is “route” command output:

192.168.20.0 * 255.255.255.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 l0

and

I have enabled IP-forwarding using
< echo "1" > /proc/sys/net/ipv4/ip_forward >

And FORWARD_IPV4=yes in sysctl.conf file.


With the above basic setup, I am able to ping

Ø client PC to eth1, eth0
Ø LAN PC to eth0 only

With the following implementation:

iptables –t nat -A POSTROUTING –o eth0 –j MASQUERADE

I am able to ping:

Ø client PC to eth1, eth0 and LAN PCs
Ø LAN PC to eth0 only

I am not able to ping either eth1 or client PC from LAN PCs. Why?

-Thanks,
Thiru
 
  


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
give routing tables setup for my network cranium2004 Linux - Networking 1 05-17-2005 10:16 AM
Error Message during 802.11b setup for Intersil Card ( prism2_usb ) setup in SoC archak Linux - Wireless Networking 0 10-13-2004 03:21 AM
[SUSE 9.1 PROF] How can I copy the setup files to my harddisk and start the setup? TheRealFalcon Linux - Distributions 1 08-07-2004 11:49 PM
Don´t know how to setup (routing) liutom Linux - Networking 1 05-21-2004 04:51 PM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM

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

All times are GMT -5. The time now is 02:13 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
Open Source Consulting | Domain Registration