Static IP Trouble for internet connection

Hi all,

I use a BBB, with Debian, to transfer files through a SSH connection, and I have been configuring it to have a static IP.

I have configured it modifying the file “/etc/network/interfaces”, where I’ve added:

The primary network interface

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
#name Ethernet alias LAN card
address 192.168.0.89
netmask 255.255.255.0
network 192.168.0.1
broadcast 192.168.0.255

And I’ve also modified the file “/etc/resolv.conf”, where I’ve added:
nameserver 192.168.0.1
nameserver 8.8.8.8

On the inTRAnet it works perfectly, but when I try to connect from the internet to the BBB it doesn’t work (with the original configuration, without static ip, the connection is established).

I think the trouble is due to the “interfaces” file changes, but I do not know why.

I’ve used the next links:
https://sheldondwill.wordpress.com/2013/12/14/beaglebone-black-ubuntu-change-to-static-ip-address/
https://www.howtoforge.com/debian-static-ip-address

Thanks in advance

Just a guess, but you do not have a gateway defined. Maybe that is the issue?

Hey

You will never connect to the BBB from outside the private network!
http://en.wikipedia.org/wiki/Private_network

You can’t use 192.168.0.89 and expect it to work outside your LAN.

Most likely , when you weren’t setting a static IP, you were getting a public IP from your router.

Andy

I’ve added the getaway (the address of my router), and the same thing, it works in my LAN, but it doesn’t work outside my LAN.

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
#name Ethernet alias LAN card
address 192.168.0.89
netmask 255.255.255.0
network 192.168.0.1
broadcast 192.168.0.255
getaway 192.168.0.1

agent paisley, to connect to the BBB from outside my LAN I use the public ip of my network, not the the static ip of the BBB in my LAN.
I can’t connect to it if I use ‘iface eth0 inet static’, but if I use ‘iface eth0 inet dhcp’, it works perfectly and I can connect to BBB outside my LAN.

What do you mean "it doesn't work outside my LAN."? If you mean you
can't access it from outside then I wouldn't expect that you could.

If you mean it can't access the outside world then it's probably
because the routing isn't set up right because it's not being
configured by the DHCP any more.

What does it return if you enter 'route' at the command prompt?

If it really says 'getaway' then that's your problem! :slight_smile:

It should be "gateway" NOT "getaway"

Yeah!! That was the problem!!! :S

iface eth0 inet static
address 192.168.0.89
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

Thanks !

good to hear it’s working. one other way to tackle this without the need for a dedicated static IP address is to use a free service like: https://developer.weaved.com/portal/members/betabeagle.php
if it looks like this might be helpful give it a try and if you have any questions I’ll try to help.