Sharing Internet Connection Using Ubuntu Server
As I mentioned in Sharing My New 3G Internet Connection With The Rest Of The Office I have a new Alltel 3G air card. In that article I configured my workstation to share the connection and having used it this way for a couple of days it isn't really working as well as I would like it. The air card does not stay connected all of the time and it is a bit of a pain to get it to reconnect if I am using my netbook in the other room. So I decided to scrap the connection on my workstation and move it to the server.
The steps to set this up is actually pretty much the same as the above referenced article with some of the article before it thrown in. I am using wvdial to actually discover the air card and dial into the Alltel network. The DHCP server can live anywhere on the network. For me it makes sense to put everything on the server.
1. Install DHCP server:
2. Make a copy and then edit the /etc/dhcp3/dhcpd.conf file:
Again, here is a copy of my /etc/dhcp3/dhcpd.conf file:
The only thing that has changed here is my server's address is 192.168.0.151.
Once the configuration file is done and saved you need to reset the DHCP server by
You can check your configuration by renewing the IP lease of one of the computers on the network.
4. Now, instead of installing Firestarter as I did in the other article, I am going to configure the iptables and for this please refer to the Internet Connection Sharing Ubuntu help page.
Since I am in the same subnet as the example, I just copied and pasted:
and made the change to /etc/sysctl.conf to add these lines:
5. So here I will install and configure wvdial just like I did in the article that started this Alltel 3G adventure
To find the air card and build the initial configuration file I ran
It discovered the card without a problem. I then went in and edited the /etc/wvdial.conf file to enter #777 for the phone number and the phone number I was given as username and password. To dial in I opened up a terminal and typed
Then I wrote a shell script to do the deed:
I love it when it works... and it did very well for over a day. That is to say I dialled in and it stayed up for over a day. This morning I came in and wasn't connected still. I didn't have time to mess with it so I took the air card and plugged it into my workstation and did what I needed to do and did my running around. After going around and around trying to get the server to connect and stay connected and then share the connection I discovered the iptables had an address that was on my subnet but wasn't one that I use. Don't know where that came from. Since I am really not familiar with iptables commands, I wasn't able to delete the entry, just re-added those that I had previously added and it is now working again.... until next time. I'll need to do some more research and testing before I will know if it is up for good.
No feedback yet
It's all about change.... I'll take a look at technical items of interest and put in my "two cents worth".