Results 1 to 5 of 5
I've been trying to turn an old computer into a switch for a setup like this:
The wire coming in from the network is from a router, so I just ...
- 02-10-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 4
Making my own switch
I've been trying to turn an old computer into a switch for a setup like this:

The wire coming in from the network is from a router, so I just wanted to use the computer as a switch for 3 other machines I have running. I have 3 NIC cards installed (in addition to the on board Ethernet adapter) on the computer I'd like to use as the switch. I've been trying to do this with the computer running Debian Etch by using iptables, but I can't seem to get it working. Any ideas?
- 02-10-2008 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,679
Do the 3 computers "in the back" have IP's on the same network as the "switch" machine?
If so, you don't need any iptables - just enable IP forwarding.
If they are on a different network, then you'll need to enable masquerading via iptables (and still enable IP forwarding.)
- 02-10-2008 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 4
I was hoping to get it set up just as if I had an actual switch coming from the router. I wanted the machines on the other side of the computer that I want to act as a switch to get their IPs from the router.
- 02-10-2008 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,679
Hmmm....DHCP requests/acks are broadcast packets. I am not sure if enabling IP forwarding will include this traffic.
You need to look up "ip forwarding" in Linux and see if it includes *all* traffic - TCP, UDP, broadcast, etc.
- 02-10-2008 #5Just Joined!
- Join Date
- Feb 2008
- Posts
- 4
Ive found a lot on how to make your own firewalls and routers, but nothing on switches.


Reply With Quote
