Networking Forums

Networking Forums > Computer Networking > Linux Networking > disable ipforwarding for one route

Reply
Thread Tools Display Modes

disable ipforwarding for one route

 
 
tiggr
Guest
Posts: n/a

 
      09-28-2003, 11:46 PM
There are three ethernet interfaces eth0, eth1 and eth2 on my Linux system.
I enabled ip forwarding so the ip packet can be routed between any pair of
these three interfaces. Now, I want to disable ip forwarding only between
eth1 and eth2. What should I do?

Thanks,

tiggr


 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      09-28-2003, 11:56 PM
tiggr <(E-Mail Removed)> wrote:

> There are three ethernet interfaces eth0, eth1 and eth2 on my Linux
> system. I enabled ip forwarding so the ip packet can be routed between
> any pair of these three interfaces. Now, I want to disable ip forwarding
> only between eth1 and eth2. What should I do?


Use iptables and block the traffic:

iptables -A FORWARD -i eth1 -o eth2 -j REJECT
iptables -A FORWARD -i eth2 -o eth1 -j REJECT


Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
tiggr
Guest
Posts: n/a

 
      09-29-2003, 02:01 AM
Thank you very much. This is exactly what I want to know.

tiggr

"Horst Knobloch" <(E-Mail Removed)> wrote in message
news:bl7ses$196t$(E-Mail Removed)...
> tiggr <(E-Mail Removed)> wrote:
>
> > There are three ethernet interfaces eth0, eth1 and eth2 on my Linux
> > system. I enabled ip forwarding so the ip packet can be routed between
> > any pair of these three interfaces. Now, I want to disable ip forwarding
> > only between eth1 and eth2. What should I do?

>
> Use iptables and block the traffic:
>
> iptables -A FORWARD -i eth1 -o eth2 -j REJECT
> iptables -A FORWARD -i eth2 -o eth1 -j REJECT
>
>
> Ciao, Horst
> --
> »When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn



 
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
Disable dynamic route entries in Windows 2003? MikeS@MLS Windows Networking 3 09-18-2008 04:14 PM
disable short route via localhost on dual network interface Andreas Wassatsch Linux Networking 2 11-26-2007 05:27 AM
VPN client adds wrong route to local route table snowdog_2112 Windows Networking 7 11-01-2005 02:05 PM
route and static route to a gateway Sting Linux Networking 2 02-21-2004 03:35 AM
Activation of ipforwarding in Win98SE Dieter Drescher Windows Networking 1 09-14-2003 04:07 PM



1 2 3 4 5 6 7 8 9 10 11