Networking Forums

Networking Forums > Computer Networking > Linux Networking > Routing Back in LINUX!! Help Please!!!

Reply
Thread Tools Display Modes

Routing Back in LINUX!! Help Please!!!

 
 
Zeckx
Guest
Posts: n/a

 
      08-16-2005, 08:33 PM
Hi,


First of all, sorry for inconvenience! I'm configuring
(testing) the GRE with Cisco and Linux and I found
some posts in archive/google but I failed, so I'm asking help
for you, since I'm searching by a long time and no solution.
If some of you could help me.


For my test I'm using a cisco router with the
following:


eth0 - 200.210.11.130
tunnel - 1.1.1.1


------------------------------*---------------------


Linux:


eth0 - 200.210.12.9
tunnel - 1.1.1.2


I want to create a GRE tunnel from the Cisco router to
my Linux box, that are running a NIDS (snort). The
idea is:


| Internet |
|
|
|
| Cisco | --GRE--> |Linux-with-Snort| ---|
| |
| |
|____________________GRE______________|


ps: My first test, only route the OUTGOING traffic of router!


Well, the GRE from Cisco to Linux is working perfectilly.

Cisco config is like this:

/* Create the tunnel Interface */
conf t
int tunnel 0
ip address 1.1.1.1 255.255.255.0
tunnel source eth0
tunnel dest 200.210.12.9
tunnel mode gre ip
exit


/* Create a policy to send all tcp traffic to Linux via GRE */

conf t
access-list 120 permit tcp any any
route-map teste
match ip address 120
set ip next-hop 1.1.1.2
exit
int eth0
ip policy route-map teste
exit


Now, in Linux I create a GRE tunnel interface:

modprobe ip_gre.o
iptunnel add mynet mode grc remote 200.210.11.130
local 200.210.12.9 ttl 255
ip addr add 1.1.1.2/24 dev mynet
ifconfig mynet up
route add -net 1.1.1.0 netmask 255.255.255.0 dev mynet

It work well. I can ping both sides.

All packets from Cisco are arriving in the Linux Box, but I'm UNABLE to

re-route (route it back) to the Cisco via GRE. :~(

I tryed used in Linux:

ip ru add from 1.1.1.1 lookup 4
ip ro add 0.0.0.0/0 via 1.1.1.2 table 4

I tryed also other rules, like:

route add -host 200.210.11.130 gw 1.1.1.1

And a lot of mix of rules, but no success. :~(

Well, based in the documentation I belive this rule is correct, but
doesn't work.

Can someone show me how to create a rule to reoute it back to Cisco (
the
documentation isn't helping me)?

Thks for help and attention.

Chers,

 
Reply With Quote
 
 
 
 
Llanzlan Klazmon
Guest
Posts: n/a

 
      08-17-2005, 12:14 AM
"Zeckx" <(E-Mail Removed)> wrote in news:1124224410.872822.46270
@g44g2000cwa.googlegroups.com:

> Hi,
>
>
> First of all, sorry for inconvenience! I'm configuring
> (testing) the GRE with Cisco and Linux and I found
> some posts in archive/google but I failed, so I'm asking help
> for you, since I'm searching by a long time and no solution.
> If some of you could help me.
>
>
> For my test I'm using a cisco router with the
> following:
>
>
> eth0 - 200.210.11.130
> tunnel - 1.1.1.1
>
>
> ------------------------------*---------------------
>
>
> Linux:
>
>
> eth0 - 200.210.12.9
> tunnel - 1.1.1.2
>
>
> I want to create a GRE tunnel from the Cisco router to
> my Linux box, that are running a NIDS (snort). The
> idea is:
>
>
>| Internet |
> |
> |
> |
>| Cisco | --GRE--> |Linux-with-Snort| ---|
> | |
> | |
> |____________________GRE______________|
>
>
> ps: My first test, only route the OUTGOING traffic of router!
>
>
> Well, the GRE from Cisco to Linux is working perfectilly.
>
> Cisco config is like this:
>
> /* Create the tunnel Interface */
> conf t
> int tunnel 0
> ip address 1.1.1.1 255.255.255.0
> tunnel source eth0
> tunnel dest 200.210.12.9
> tunnel mode gre ip
> exit
>
>
> /* Create a policy to send all tcp traffic to Linux via GRE */
>
> conf t
> access-list 120 permit tcp any any
> route-map teste
> match ip address 120
> set ip next-hop 1.1.1.2
> exit
> int eth0
> ip policy route-map teste
> exit
>
>
> Now, in Linux I create a GRE tunnel interface:
>
> modprobe ip_gre.o
> iptunnel add mynet mode grc remote 200.210.11.130
> local 200.210.12.9 ttl 255
> ip addr add 1.1.1.2/24 dev mynet
> ifconfig mynet up
> route add -net 1.1.1.0 netmask 255.255.255.0 dev mynet
>
> It work well. I can ping both sides.
>
> All packets from Cisco are arriving in the Linux Box, but I'm UNABLE to
>
> re-route (route it back) to the Cisco via GRE. :~(
>
> I tryed used in Linux:
>
> ip ru add from 1.1.1.1 lookup 4
> ip ro add 0.0.0.0/0 via 1.1.1.2 table 4



Try

ip ro add 0.0.0.0/0 via 1.1.1.1 dev mynet

That would make the tunnel the default gateway. Not sure you really want
that. You should specify a route for each individual subnet you want to get
to via the GRE tunnel.

Klazmon





>
> I tryed also other rules, like:
>
> route add -host 200.210.11.130 gw 1.1.1.1
>
> And a lot of mix of rules, but no success. :~(
>
> Well, based in the documentation I belive this rule is correct, but
> doesn't work.
>
> Can someone show me how to create a rule to reoute it back to Cisco (
> the
> documentation isn't helping me)?
>
> Thks for help and attention.
>
> Chers,
>
>


 
Reply With Quote
 
Zeckx
Guest
Posts: n/a

 
      08-19-2005, 08:50 PM
Yo Klazmon

Thks for reply, but I already had added this route without success

# ip ro add 0.0.0.0/0 via 1.1.1.1 dev mynet
RTNETLINK answers: File exists

cya

 
Reply With Quote
 
Llanzlan Klazmon
Guest
Posts: n/a

 
      08-22-2005, 03:21 AM
"Zeckx" <(E-Mail Removed)> wrote in news:1124484613.136363.32370
@g44g2000cwa.googlegroups.com:

> Yo Klazmon
>
> Thks for reply, but I already had added this route without success
>
> # ip ro add 0.0.0.0/0 via 1.1.1.1 dev mynet
> RTNETLINK answers: File exists



The 0.0.0.0/0 is the default gateway. The above error is because you
already have a default gateway defined. You can either change your default
gateway to 1.1.1.1 or delete the route for the existing default gatway and
add the route above, (note that the latter is not a permanent change).The
'ip ro' command by itself will list the current routes known to your system
(equivalent to 'sh ip route' on the cisco). It will print the words default
gateway on the line referring to the 0.0.0.0/0 route.

Klazmon.
>
> cya
>
>


 
Reply With Quote
 
Zeckx
Guest
Posts: n/a

 
      08-24-2005, 01:39 PM
Hi Klazmon

Thank you for good information.

Cheers,

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desiging Back-to-Back ISA Firewall & VLAN Routing Habibalby Windows Networking 1 01-02-2009 03:20 PM
Connecting two HP Procurve switch back to back f64shooter@gmail.com Windows Networking 0 04-19-2007 12:26 AM
If I replace my existing Linksys box with Linux Router, how can I know what kind of Routing to be enabled on my Linux Box? santa19992000@yahoo.com Linux Networking 3 01-06-2005 01:18 PM
REPOST: Screw Linux, I'm going back to Windows! nospam@nospam.com Linux Networking 14 09-13-2004 05:56 AM
Tape Back solutions for Linux Tom Hansen Linux Networking 3 10-10-2003 02:41 AM



1 2 3 4 5 6 7 8 9 10 11