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.
We 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.
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.
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.
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.
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 10.42.0.0/24 Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-11 14:38 CET Nmap scan report for 10.42.0.1 Host is up (0.00018s latency). Nmap scan report for 10.42.0.79 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 10.42.0.1 corresponds to our laptop or PC; and the other to the Raspberry.
#Y finalmente nos conectamos usuario@maquina:~$ ssh firstname.lastname@example.org The authenticity of host '10.42.0.79 (10.42.0.79)' 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 '10.42.0.79' (ECDSA) to the list of known hosts. email@example.com'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 192.168.1.34
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.