My computer is already connected to a 100Mbps LAN. I can use wvdial to connect to internet using a modem when I have my LAN disconnected.

Now, I want to share this modem internet to one of the IP addresses available on LAN. Say for example.

First of all, can it be done?
How do I go about doing that?

  • How can I do it without any hardware? – Abhijeet Rastogi Mar 11 '10 at 12:16
  • Please describe your hardware situation. How do you connect to the LAN, how do you connect to the modem, how do you connect to the Internet, etc. – sleske Mar 11 '10 at 15:29
  • I have a USB modem and I connect to internet using wvdial... I have an eth0 card which is connected to LAN... – Abhijeet Rastogi Mar 11 '10 at 19:49
  • "USB modem" is not enough. Is it a cable modem? For analog dialup? What ISP? How did you configure dialup? You won't get meaningful help if you do not provide the details of your configuration. – sleske Mar 15 '10 at 9:28
  • Its a RELIANCE NEtconnect 3.1 Mbps USB Modem. And I have a LAN of 100Mbps... – Abhijeet Rastogi Mar 15 '10 at 21:35

You need a router. You can configure your computer to act as a router (this is usually referred to as "connection sharing"); most OSes have some built-in mechanism to do this.

Or you could just buy a hardware router, and put it between your modem and your computer. This is probably both easier to set up and more flexible (as it will work even if your computer is off). Simple hardware routers (even with WLAN built in) are quite cheap, usually starting at about 30 $ / Euro.

Now, I want to share this modem internet to one of the ip address available on LAN say

Normally, you'd make the internet connection available to all computers on the LAN. If you want to restrict it, that can usually configured on the router as well.

  • Tell me how can I do it without hardware.. – Abhijeet Rastogi Mar 11 '10 at 12:14

You can't do it without additional hardware. You can do it without a router, but you'll need a second network card in your PC so it can connect to the LAN and the modem at the same time. Then you'll need to set up internet connection sharing (not sure how hard this is to do on Linux) or set up a proxy server on your PC.

Ultimately though, it's really worth just spending a few bucks and getting a router. You'll save yourself a lot of time and hassle and ultimately have a better solution.

  • U sure.. Actually I am not sure but I think it can be done using iptables.. I have got two interfaces,, ppp0 & eth0.. Am i right? I am just not sure how to do it – Abhijeet Rastogi Mar 11 '10 at 14:02
  • Guess I don't check this site very often, but you didn't accept an answer so I'll reply. You need 1 network card to plug into the modem and one network card to plug into the LAN. There may be other options (such as networking over serial cables to another computer) but for the price the router is really worth avoiding the hassle. – Kendrick Sep 9 '10 at 15:06

ipmasq is what you want. This tutorial is ubuntu-specific, and shows how to set up a dhcp-server if you don't want a static IP on your second computer.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.