MLS
02-29-2004, 06:25 PM
Ok, heres what I want done:
I have 4 computers in my house, I have 5 IPs available from my ISP, I do NOT want to NAT a single IP for all 4 computers. I have cablemodem>Linux>Switch>3 other computers. I want my external interface on Linux, lets call it eth0, to grab 4 IPs via DHCP, eth0 grabs one IP, that one will only go to Linux itself, eth0:0 grabs another and 1:1 NATs to computer 1, ie 192.168.0.2, then eth0:1 grabs another and 1:1 NATs to computer 2, etc. This way I have 4 unique IPs, so I can connect to outside the lan game servers with no NAT issues (because the comps are actually different WAN ips). I should also be able to have a server running on comp 1 and comp 2 on the same port with no issues. This is my theoretical setup. Is this possible and will it work? and if so... Does anyone know how to set this up via iptables?
I assume I will have to set eth0:0, 0:1, etc to unique MAC addresses for one.. I attempted this by setting eth0:0 mac address:
ifconfig eth0:0 hw ether xx:xx:xx:xx:xx:xx (eth0's mac address with a few things changed in the last 3 hex values )
then doing:
dhcpcd eth0:0
But it wouldn't work.. Does this mean its not possible? :( I can grab two IPs if I use seperate NICs, I suppose I could plug 5 NIC's in there but I was hoping to do it with only two.
/MLS
I have 4 computers in my house, I have 5 IPs available from my ISP, I do NOT want to NAT a single IP for all 4 computers. I have cablemodem>Linux>Switch>3 other computers. I want my external interface on Linux, lets call it eth0, to grab 4 IPs via DHCP, eth0 grabs one IP, that one will only go to Linux itself, eth0:0 grabs another and 1:1 NATs to computer 1, ie 192.168.0.2, then eth0:1 grabs another and 1:1 NATs to computer 2, etc. This way I have 4 unique IPs, so I can connect to outside the lan game servers with no NAT issues (because the comps are actually different WAN ips). I should also be able to have a server running on comp 1 and comp 2 on the same port with no issues. This is my theoretical setup. Is this possible and will it work? and if so... Does anyone know how to set this up via iptables?
I assume I will have to set eth0:0, 0:1, etc to unique MAC addresses for one.. I attempted this by setting eth0:0 mac address:
ifconfig eth0:0 hw ether xx:xx:xx:xx:xx:xx (eth0's mac address with a few things changed in the last 3 hex values )
then doing:
dhcpcd eth0:0
But it wouldn't work.. Does this mean its not possible? :( I can grab two IPs if I use seperate NICs, I suppose I could plug 5 NIC's in there but I was hoping to do it with only two.
/MLS