Ubuntu 14.10 – Sharing internet with another computer

Today we see as share Internet on Ubuntu with other end devices in the network, as example we used a Raspberry PI; that you will use the port as a gateway to the local network Ethernet of my my laptop, that is connected to the network via WiFi.

crossWe will create an internal network between these two devices to finally do NAT to the local network with the same IP laptop.

A user of the Forum of Raspberry PI call Shanti He asked me if he could explain what I mean when I talk about Internet sharing with another computer using Ubuntu as a system, and I think it could be useful for most users.

Screenshot of 2014-12-05 15:14:37

Will only need a crossover cable to connect the two devices, one at each end; This type of cable is used to connect two devices of the same type; in this case two computers.


Crossover cable purchase in store.

The crossover cable ourselves we can manufacture it by combining rules TIA/EIA 568A, and TIA/EIA 568B; one at each end of the cable.


Standards T568A diagrams, T568B and the crossover cable.

To do this we only need one grimpadora, a piece of twisted pair cable, two heads RJ45, and a little patience; election of each one is add a couple of protectors to heads, but it is recommended and are very economic.

Homemade crossover cable.

Homemade crossover cable.

Then the only thing we have to do is configure the current connection using the network Manager, and modify the method of Automatic (DHCP) to Shared with other equipment.

IPv4 settings-> Shared with other equipment.

IPv4 settings-> Shared with other equipment.

The connection that we just, We will understand it better with the following network diagram.


Now Raspberry PI already have Internet connection, and we only need your IP for connect by SSH; If do not have keyboard and screen for the PI, can scan the network in search of its IP with Nmap.

#Instalamos NMAP
usuario@maquina:~$ sudo apt-get install nmap

#Hacemos un sondeo ping de la red
usuario@maquina:~$ nmap -sP

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-11 14:38 CET
Nmap scan report for
Host is up (0.00018s latency).
Nmap scan report for
Host is up (0.00051s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 3.22 seconds

And we can already connect through SSH and start working, but we must bear in mind that the IP corresponds to our laptop or PC; and the other to the Raspberry.

#Y finalmente nos conectamos
usuario@maquina:~$ ssh pi@
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is 5d:e7:6c:3d:af:49:b3:ea:d7:d9:bb:ce:d9:56:81:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
pi@'s password: 
Linux raspberrypi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Last login: Tue Nov 11 04:18:28 2014 from

If you like you can follow me on Twitter, Facebook, Google +, LinkedIn, or share it with the buttons under this publication, If you have any questions or suggestions please do not hesitate to comment.

Help us to reach more readers Share on LinkedIn
Share on Facebook
Tweet about this on Twitter
Share on Google+
Google +
Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *