Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to share internet connection from my ubuntu box with my smartphone. The problem is when I try create new wireless network via GUI, I have problems with my internet connection. I guess that my machine is still connected to the internet physically, but I cannot access any website via web browser. Also, I can connect to wireless network via my smartphone, but again, I cannot browse the internet. I use Ubuntu 9.10 Desktop edition. My wi-fi adapter is TP-LINK TL-WN821N. If you need some more info - please feel free to ask. I'm not professional system administration and I don't even know what information should I provide.

EDIT: IP routing is allowed on my machine.

Here are route command outputs: Before I create wireless network:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
stream-ts1.net. *               255.255.255.255 UH    0      0        0 ppp0
10.8.65.0       *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         *               0.0.0.0         U     0      0        0 ppp0

After I create wireless network:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
stream-ts1.net. *               255.255.255.255 UH    0      0        0 ppp0
10.42.43.0      *               255.255.255.0   U     0      0        0 wlan2
10.8.65.0       *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         10.8.65.1       0.0.0.0         UG    0      0        0 eth0

Thanks in advance.

share|improve this question

3 Answers 3

http://brainstorm.ubuntu.com/item/14354/

But... It may require two separate network adapters (e.g. 2 wireless, wireless & wired, etc.) depending on the capabilities of your wireless hardware versus its available device driver capabilities.

share|improve this answer

Probably you only need to define a new default route (host 0.0.0.0 and gateway on your internet adapter network) for your machine. What is the output of route command? (would be safer to change or mask your public IPs in the output)

You may also need to allow IP routing on your machine as I don't know if your GUI installer did that for you (and the default is disabled) but you can check with:

cat /proc/sys/net/ipv4/ip_forward

If it says 0, it is not enabled and you can do /bin/echo 1 > /proc/sys/net/ipv4/ip_forward to enable it (as root)

share|improve this answer
    
Thanks for your answer. –  Vladimir Kadalashvili Oct 3 '10 at 18:37
    
IP routing is allowed. –  Vladimir Kadalashvili Oct 3 '10 at 18:38
    
Seeing the routes you posted, try to do sudo route del default and sudo route add default dev ppp0 to rebuild your original default rule and see if it works. If yes, you'll have to persist this change in your create wireless script (or better, disable the change the script is doing to your default route) –  laurent Oct 5 '10 at 1:13

It looks like you are setting the gateway in your configuration. It is being moved from your ppp connection to eth0. Don't set the gateway for either the wireless or ethernet adapter.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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