I have a Linux (Ubuntu 12.04) PC connected to the internet with a Greenpacket WiMax USB modem. I want to share the Internet connection with another computer running Windows 7 Home Premium, connected to the Linux PC over a LAN. Is this possible? How? Is the reverse possible instead (connecting the internet to the Windows computer and sharing it with Linux)?
|
|
You need to set up NAT on the Linux box. There are numerous howtos on the Net when you search for NAT and iptables, maybe including the distro you use. Here is a howto for Debian which should work on other distros as well: http://debianclusters.org/index.php/NAT_with_IPTables Here are some lines that come from a German Ubuntu howto:
Put them somewhere, where they are executed at startup (/etc/rc.local or you put "up" in front of every line and put the whole thing into /etc/network/interfaces) and replace eth0 by the network device that connects to the Internet and eth1 by the one that goes to your LAN. You might also have to tell your Windows box some name servers (DNS) manually if you don't want to set up |
||||
|
|
|
You can share internet connection from Windows to Linux. In windows make sure internet sharing is enabled. Go to control panel, find network connection, and then right click on internet adapter. Click properties and advance. Right there click radio button to enable internet sharing. On Linux side, with root privilege, 1.type this on terminal to set default gateway:
(note: replace x.x.x.x by windows local IP, you can find it by typing:
(note: replace y.y.y.y by DNS address on Windows, you can find it by typing: In this scenario, Windows is already connected to internet. After all the set up you can try now to use the internet from Linux. Now both Linux and Windows should be able to use internet simultaneously. |
|||||||||||||
|