Bosse_B
Posts: 1086
Joined: Thu Jan 30, 2014 9:53 am

RPi4 gets IP address from router mut not when directly on ISP

Thu Mar 12, 2020 7:56 am

I have a weird problem I do not understand...
I have set up my RPi4 to run as a backup server and OpenVPN server.
This works well when connected to the internal router on the home LAN but when I connect the Ethernet cable directly to the fiber box eternet it winds up with the fallback address 169.254.99.12 and has no Internet access.

But if I connect an Ubuntu laptop to the same ethernet connector it does get a public IP address and is operational on the Internet.
On the RPi4 box with Raspbian Buster Lite (headless) I have installed the ufw firewall and only opened the ssh and openvpn ports.
The idea is to connect the backup server directly to the Internet at my daughter's home using a different ethernet connector so it won't interfere with her network.
I have not done this before, but I have always been behind a router of some sort. This is the first time going directly on to the Internet.

What can I look for now to fix this?
EDIT:
I tried this:

Code: Select all

pi@rpi4-asa:~ $ sudo dhclient -r eth0
pi@rpi4-asa:~ $ sudo dhclient -v eth0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/dc:a6:32:3a:18:a6
Sending on   LPF/eth0/dc:a6:32:3a:18:a6
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Bo Berglund
Sweden

Return to “Raspberry Pi OS”