Networking Forums

Networking Forums > Computer Networking > Linux Networking > Iptables bridge

Reply
Thread Tools Display Modes

Iptables bridge

 
 
Marcelo Valenzuela
Guest
Posts: n/a

 
      02-01-2004, 07:04 PM
Hi, at home I have a PC that has 3 NICs:

eth0: 192.168.0.0/255.255.255.0 (example: 192.168.0.6)
eth1: dynamic ip to the internet
eth2: 192.168.0.0/255.255.255.128 (example: 192.168.0.200)

My iptables script does the trick, and I share the internet conn
without trouble at all.

But what I need is to play games from pcs from 1 subnet to the other.
For example to be able from 192.168.0.200: ping 192.168.0.6 and that
it works.

Can I achieve that with an iptables or route command?

sorry for my english.
thanks for the knowledge.
I use 2.4.19 and iptables v1.2.6a
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      02-02-2004, 01:25 AM
Marcelo Valenzuela <(E-Mail Removed)> wrote:
> Hi, at home I have a PC that has 3 NICs:
>
> eth0: 192.168.0.0/255.255.255.0 (example: 192.168.0.6)
> eth1: dynamic ip to the internet
> eth2: 192.168.0.0/255.255.255.128 (example: 192.168.0.200)


This will cause routing problems, as eth0 encloses eth2. I'm guessing
you think you're trying to split 192.168.0.0/24 into two subnets, in
which case you should make
eth0 192.168.0.0/25 and eth2 192.168.0.128/25

$ ipsc -h 192.168.0.0/25
Address allocation range: 192.168.0.0 - 192.168.0.127
Full subnet mask: 255.255.255.128

$ ipsc -h 192.168.0.128/25
Address allocation range: 192.168.0.128 - 192.168.0.255
Full subnet mask: 255.255.255.128

Alternatively, if you want what is connected to eth0 and eth2 to be on
the same subnet, you can use Linux bridging (802.1d) to make join your
eth0 and eth2 into a switch, creating a new interface sw0 (IIRC, it's
been a long time).

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Marcelo Valenzuela
Guest
Posts: n/a

 
      02-02-2004, 03:27 PM
Cameron Kerr <(E-Mail Removed)> wrote in message

> This will cause routing problems, as eth0 encloses eth2. I'm guessing
> you think you're trying to split 192.168.0.0/24 into two subnets, in
> which case you should make
> eth0 192.168.0.0/25 and eth2 192.168.0.128/25
>
> $ ipsc -h 192.168.0.0/25
> Address allocation range: 192.168.0.0 - 192.168.0.127
> Full subnet mask: 255.255.255.128
>
> $ ipsc -h 192.168.0.128/25
> Address allocation range: 192.168.0.128 - 192.168.0.255
> Full subnet mask: 255.255.255.128
>
> Alternatively, if you want what is connected to eth0 and eth2 to be on
> the same subnet, you can use Linux bridging (802.1d) to make join your
> eth0 and eth2 into a switch, creating a new interface sw0 (IIRC, it's
> been a long time).


sorry, I posted wrong the info about the netmask,etc. I do have it as
you say. Finally I re-compiled my kernel with ethernet bridge as a
module, and aptgeted bridge-utils.

thanks for answering.
 
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
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
Bridge-nf problem with "iptables FORWARDING --in-interface eth0" =?ISO-8859-1?Q?Michael_H=E4ger?= Linux Networking 0 08-26-2004 07:33 AM
iptables on bridge chain tranversal question Josh T Linux Networking 0 04-27-2004 11:42 AM
Using XP Ethernet Bridge Mode as Wireless Bridge DrewJ Wireless Internet 0 08-13-2003 10:35 PM
Bridge-nf iptables frustration tylernt Linux Networking 0 07-23-2003 01:18 AM



1 2 3 4 5 6 7 8 9 10 11