Jump to content

Networking Issue


Recommended Posts

Ok, I'm having an issue sharing my internet with my other computer... I have an external DSL modem connected to the host computer... and I have 2 nic cards in the host computer as well... one is connected to the modem, and the other is connected to my computer... The computers can see each other on the network,... but its not sharing internet access... does anyone know how I can get this to work?
Link to comment
Share on other sites

Assuming IPv4 and Linux, either...

  1. The computer closest to the modem is not configured to pass packets on one interface onto the other. To fix this...
     
    # echo 1 > /proc/sys/net/ipv4/ip_forward


...Or...


  1. The computer farthest from the modem is (correctly) saying that its packets are coming from one of these addresses, and your ISP is dropping them. You'll need to have the computer nearest the modem change all packets coming from the other computer such that they describe themselves as coming from an IP that the ISP will accept -- EG, by building iptables into the kernel and...
     
    # iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE && iptables --append FORWARD --in-interface eth0 -j ACCEPT


Neither of these fixes will survive a reboot, so put them in init.d. To be honest, for some things, it'll probably be easier to just run your application on the computer closest to the modem, and have it display on the computer farthest from the modem. Some good fringe benefits this way, too, especially if the computer farthest from the modem is running one of the more primitive OSes, like, say, Windows.

 

For more (and better) information, look up a HOWTO on building a router.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...