Moving packets from one port to another

2012-08-15 Thread James Allsopp

Hi,
I'm trying to route packets from ones from one interface to another, 
without using NAT i.e.


eth0: 192.168.1.31 (connected to rest of world and DHCP server)
eth1: 192.168.1.32 (connected to other computers.)

The other computers would be on the 192.168.1.0/24 subnet and hopefully 
be able to see all the computers on the subnet.


I presume I'm going to have to make some sort of bridge, with some 
forwarding as with IPtables. It would be nice not to have a static IP on 
the other computers.


Any suggestions, or discussion of the options, would be gratefully received,
James


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/502c177a.70...@googlemail.com



Re: Moving packets from one port to another

2012-08-15 Thread Claudius Hubig
Hello James,

James Allsopp jamesaalls...@googlemail.com wrote:
 Hi,
 I'm trying to route packets from ones from one interface to another, 
 without using NAT i.e.
 
 eth0: 192.168.1.31 (connected to rest of world and DHCP server)
 eth1: 192.168.1.32 (connected to other computers.)
 
 The other computers would be on the 192.168.1.0/24 subnet and hopefully 
 be able to see all the computers on the subnet.
 
 I presume I'm going to have to make some sort of bridge, with some 
 forwarding as with IPtables. It would be nice not to have a static IP on 
 the other computers.
 
 Any suggestions, or discussion of the options, would be gratefully received,
 James

There are two ways to do this:

a) The bridge: You add both eth0 and eth1 to a bridge, which then
gets an IP address from the DHCP server and forwards everything on
the ethernet level.

b) The router: For this to work, you need to divide your subnet into further 
subnets (or only use specific IPs behind the gateway) in order to


-- 
  A board is the planck unit of boredom.
http://chubig.net  telnet nightfall.org 4242


signature.asc
Description: PGP signature


Re: Moving packets from one port to another

2012-08-15 Thread Claudius Hubig
Hello James,

please excuse the incomplete mail. Ctrl+Return did not do what I
intended it to do. :\

James Allsopp jamesaalls...@googlemail.com wrote:
 Hi,
 I'm trying to route packets from ones from one interface to another, 
 without using NAT i.e.
 
 eth0: 192.168.1.31 (connected to rest of world and DHCP server)
 eth1: 192.168.1.32 (connected to other computers.)
 
 The other computers would be on the 192.168.1.0/24 subnet and hopefully 
 be able to see all the computers on the subnet.
 
 I presume I'm going to have to make some sort of bridge, with some 
 forwarding as with IPtables. It would be nice not to have a static IP on 
 the other computers.
 
 Any suggestions, or discussion of the options, would be gratefully received,
 James

There are two ways to do this:

a) The bridge: You add both eth0 and eth1 to a bridge, which then
gets an IP address from the DHCP server and forwards everything on
the ethernet level.

b) The router: For this to work, you need to divide your subnet into
further subnets (or only use specific IPs behind the gateway) in
order to
 - set up your external DHCP server/router to tell it that it can
   find those IPs behind the gateway.
 - set up your gateway to tell it to forward stuff to those computers
   via eth1.
If this is done, you need to enable IP forwarding via a sysctl call
on the gateway. Here, the forwarding takes place on the IPv4/6 level.

I would suggest to go by a), which is much simpler. If you need more
help with either of them, please feel free to ask.

Best regards,

Claudius
-- 
  A board is the planck unit of boredom.
http://chubig.net  telnet nightfall.org 4242


signature.asc
Description: PGP signature