Hi,
these days I had to deal with an interesting network configuration, where I wanted to share the internet conection between a computer and a laptop using an access point and two classic network cards. Both, the PC and the laptop are using Ubuntu!
Let start with the internet provider. The connection to the internet was made through a PPP connection, wich I managed to establish and save, using the pppoeconfig tool, as you can see in the picture above.
The access point was the next thing I configured. I set it to ask a password when connecting to the wireless network, and next, to manage it’s clients IP addresses using DHCP. Then I restarted the AP.
I set the eth1 to take it’s IP address from DHCP, and reconnected the the cable between eth1 and AP.
I verified the laptop, and it found now my wireless network. I successfully connected to the AP on my laptop. But, I had no connection to the internet, although the pings between my Ubuntu boxes were working.
I reconfigured the DHCP settings with the DNS from PC’s /etc/resolv.conf and rechecked default gateway to PC’s IP address. Still no internet connection on laptop.
I start googling, and I must say that so far, nor this or even this articles helped me out much. But, I found this article on our Romanian Ubuntu and Kiwi Forums, witch somehow suited my needs.
I wrote the file with the iptables configuration and added it to /etc/network/interfaces. I also launched #echo 1 > /proc/sys/net/ipv4/ip_forward and added the line net.ipv4.ip_forward = 1 to /etc/sysctl.conf.
I rebooted both machines, and the AP.
Now, the moment of truth! I gained Internet connection on my laptop, but only partially!!!
This means that I can access only some websites, and can connect only to limited hosts. More than that, the old websites sometimes are not accessible as been before!
If anyone can offer us a better solution, I would gladly try it and post here the updates!
Thank you in advance.
Updates:
After a chat with Cristi, he gave me the idea to make an intermediate DNS server between the AP and it’s clients. So I’ve installed dnsmasq on the PC, and changed AP DNS server settings to use the PC IP address.
Guess what? We finally obtained a full featured network with Internet connection between its workstations!!!
P.S.: Credits go to Cristi and Sebastian Ivan!


