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 03-24-2006, 04:57 AM   #1
jokobbb
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Rep: Reputation: 0
Question Route configuration


Hi,

My computer run under fedora core 4.I would like to configure on my computer which own 2 interfaces to be able to send data stream on a interface, pass through a router and come back to my another interface.
The problem that is the computer begin to parse the local table (ip route2)and see his interface in direct and refuse to pass by the other interface.

Thanks a lot!
 
Old 03-24-2006, 05:45 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
can u send the output of

route -n

ifconfig

and tell us your problem with respect to the interfaces.

regards
 
Old 03-24-2006, 06:44 AM   #3
jokobbb
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you for you answer.

ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:06:5B:E0:FB:5D
inet addr:192.20.0.2 Bcast:192.20.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2014 (1.9 KiB) TX bytes:9042 (8.8 KiB)
Interrupt:11 Base address:0xcc00

eth1 Link encap:Ethernet HWaddr 00:06:5B:EB:93:21
inet addr:192.21.0.2 Bcast:192.21.1.255 Mask:255.255.254.0
inet6 addr: fe80::206:5bff:feeb:9321/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1530 (1.4 KiB) TX bytes:2229 (2.1 KiB)
Interrupt:11 Base address:0x6800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1933 errors:0 dropped:0 overruns:0 frame:0
TX packets:1933 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2372622 (2.2 MiB) TX bytes:2372622 (2.2 MiB)

route -n output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.20.0.0 192.21.0.1 255.255.255.0 UG 0 0 0 eth1
192.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.21.0.0 192.20.0.1 255.255.254.0 UG 0 0 0 eth0
192.21.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth1

When I ping 192.21.0.2 from 192.20.0.2, the ping is direct and it's not what I want.

I would like that the ping echo request and so response pass through the router.
echo request:192.21.0.2->192.21.0.1->192.20.0.1->192.20.0.2
echo response:192.20.0.2->192.20.0.1->192.21.0.1->192.21.0.2
Ping it's just an example, I would like this for all data stream.
 
Old 03-24-2006, 09:49 AM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
If eth0 and eth1 shown here are on the same box then a direct response is what you will get as they are both directly conneced networks on the same machine.
 
Old 03-24-2006, 10:19 AM   #5
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
To further what Pete said:

AFAIK there is no way to get a system to shut off local requests to an IP address that would still allow it to receive responses to that IP from across a network. In other words, the only way to get the local system to not immediatly respond to a local ping request to 192.21.0.2 would also make it not respond to ping requests that come in from the network.

When you request a connection (ping) to an IP address, it doesn't technically originate from one interface so you are never actually pinging "from 192.20.0.2" you are pinging from the system that knows it is directly connected to both 192.20.0.2 and 192.21.0.2
 
Old 03-26-2006, 11:33 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
well your routing table looks garbled

192.20.0.0 192.21.0.1 255.255.255.0 UG 0 0 0 eth1
192.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.21.0.0 192.20.0.1 255.255.254.0 UG 0 0 0 eth0
192.21.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth1

You do not have a default route set . Also you have two routes set for a single network "192.20.0.0"
 
Old 03-28-2006, 06:55 AM   #7
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
You could do this with a cisco router by using VRF's but it seems a completely poinless excercise. Prehaps if you explain what you want to achieve by doing this we might be able to suggest a more sensible method.
 
Old 03-30-2006, 01:31 AM   #8
jokobbb
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Hi,

Thank you for your answers.
I would like to use ftester which is composed of a packet injector and a sniffer on a same computer with 2 interfaces in order to confirm rules of my firewall.
Thanks....
 
Old 03-30-2006, 04:56 AM   #9
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Why not put a scanner/ packet injector on the outside and a sniffer on the inside? Its a much more realistic test than creating an artificial routing scenario which may give you invalid results.

Alternatively you could go to grc.com and use shields up!
 
Old 03-30-2006, 05:44 AM   #10
jokobbb
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Why not put a scanner/ packet injector on the outside and a sniffer on the inside?
Because I do this for a company and this is a requirement.
Thank you.
 
Old 03-30-2006, 09:04 AM   #11
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Well tell them it isn't a realistic requirement. Creating an unusual routing scenario simply for the purposes of testing is changing what you are trying to test. The results you get are likely to be invalid for the system as it is when you put it back to normal.
 
Old 03-31-2006, 04:00 AM   #12
jokobbb
LQ Newbie
 
Registered: Mar 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Do you know iproute2?
It's maybe possible with that, if I configure a policy routing?
 
Old 03-31-2006, 11:32 AM   #13
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally Posted by jokobbb
Do you know iproute2?
It's maybe possible with that, if I configure a policy routing?
Quote:
Originally Posted by Darin
AFAIK there is no way to get a system to shut off local requests to an IP address that would still allow it to receive responses to that IP from across a network.
Quote:
Originally Posted by baldy3105
...it isn't a realistic requirement. Creating an unusual routing scenario simply for the purposes of testing is changing what you are trying to test. The results you get are likely to be invalid for the system as it is when you put it back to normal.
In other words, you can't send traffic out onto a network that is destined back at the local machine, and even if you could then testing your firewall from inside the firewall doesn't tell you anything about the security of it from the outside.

That's like testing a deadbolt on the front door of your house...if you can just turn the lever from the inside, does that prove that your house is insecure?
 
  


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
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
static route configuration guide bholler Linux - Networking 4 05-20-2005 12:21 PM
For Linux GURU's: route configuration in complex network netguy2000 Linux - Networking 1 09-06-2004 09:00 AM
Windows route configuration easier than Linux??? hdalle Linux - Networking 5 08-25-2004 06:14 AM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM

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

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