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
The question asks,
Here's how you can share your Internet connection from Windows to Linux.
With root (
In this scenario, Windows is already connected to the Internet. After all the setup, you can try now to use the Internet from Linux. The Linux and Windows hosts should be able to use the Internet simultaneously.