problems accessing internet from pc attached to laptop

Nils Kassube kassube at gmx.net
Sun Feb 2 15:26:35 UTC 2014


robert rottermann wrote:
> I have a laptop running 13.1
> 
> It is connected to the internet using its internal wfi adapter.
> To its Ethernet plug I have attached an other pc running a debc/netw
> ian based Linux (rasbian on a rasberry).
> 
> Accessing the rasberry works fine, and it can also ping the laptop.
> 
> However it can not "reach" outside its own address range. It can
> neither ping the wlan router, nor the internet.
> 
> here are the settings of the two pcs:
> 
> laptop
> --------
> root at porti:~# cat /etc/network/interfaces
> # interfaces(5) file used by ifup(8) and ifdown(8)
> auto lo
> iface lo inet loopback
> 
> auto eth0
> iface eth0 inet static
>      address 192.168.1.30
>      netmask 255.255.255.0
> 
> rasberry
> -----------
> root at raspberrypi:/home/pi# cd
> root at raspberrypi:~# cat /etc/network/interfaces
> auto lo
> 
> iface lo inet loopback
> #iface eth0 inet dhcp
> iface eth0 inet static
>      address 10.168.1.10
>      netmask 255.255.255.0
>      gateway 10.168.1.30

I suppose those 10.* addresses should rather be 192.* because otherwise 
it shouldn't be possible to reach the raspberri pi.

Anyway, on your laptop you should enable ipv4 forwarding. Furthermore 
you may need an entry in /etc/resolv.conf of the raspberry which points 
to your DNS server (your router or the DNS server of your ISP).

And then there is a detailed description at the Ubuntu help site:
<https://help.ubuntu.com/community/Internet/ConnectionSharing>


Nils





More information about the ubuntu-users mailing list