• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

weird networking method

gimlids

Member
i've ended up with two nic's for one comp, so i want to know if i can use them in a linux box instead of buying a switch:

i'll have a homepna router (linksys hpro200 or so) with one lan port. can i plug one of the nics on the linux box into there, and plug another computer into the second nic, and set the linux box to act as a sort of pass-through or switch? i want the computer connected to the linux box to have a different ip from the linux box so that machines on the other side of the router (the homepna section, not wan) can see the two seperately.
 
yes in bash do this:
$> modprobe ipt_MASQUERADE # If this fails, try continuing anyway
$> iptables -F; iptables -t nat -F; iptables -t mangle -F
$> iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to (eth1's ip)
$> echo 1 > /proc/sys/net/ipv4/ip_forward

$> modprobe ipt_MASQUERADE # If this fails, try continuing anyway
$> iptables -F; iptables -t nat -F; iptables -t mangle -F
$> iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to (eth0's ip)
$> echo 1 > /proc/sys/net/ipv4/ip_forward
 
I skimmed over the howto...it looks like this is the closest fit to want I want to do, but, using the feature that gives the linux machine an ip, can all my other services like nfs, http, ftp, ssh, etc. run on the linux machine? The linux box's primary use will be a server, not a bridge, as there is no need for a bridge (there will only be 1 computer on one side of the bridge, and it won't even be used often. If it's too tricky, I'll just buy a switch but since the computer won't be used often at all I'm investigating a costless method of solving the problem.
 
Yes, you should be able to run the services on the Linux box.... Once you have created the bridge, you can use "ifconfig" to give the bridge an IP address (It should look like "ifconfig <BRIDGE NAME> <IPADDRESS> mask <NETMASK>"). From there you should be able to use it. If you already have the neccessary equipment you may want to try it just to see if you can do it, or you could just purchase the switch.
 
Back
Top