Solved Raspbian not using fixed external ip

January 1, 2020 at 16:45:08
Specs: Raspbian Buster, Pentium D
I have a fixed external ip address, and the Windows and iOS devices connected my router all show it correctly when I use whatsmyip.com. For some reason, the Raspberry Pi 3 running Buster does not. Instead, it appears to be using a dynamically assigned external IP.

I am behind a corporate firewall, but all ports are forwarded to my router, which obtains its external IP address (i.e., my fixed IP address) automatically. Why would the Pi grab onto a different external IP address than the static one assigned to us? I need to run a VPN server on the Pi; I assume my client computers will fail to connect from the Internet if the Pi is is not using our static IP address.


See More: Raspbian not using fixed external ip

Report •

✔ Best Answer
January 5, 2020 at 07:28:29
I suspect you've configured your Pi incorrectly. From the sounds of it, the Pi is going out and getting an IP from DHCP somewhere outside your LAN. This is VPN client behavior. You need to check the setup on your Pi and ensure you have it set to "VPN server".

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***

message edited by Curt R



#1
January 3, 2020 at 07:26:50
Could your Pi already be connecting to a VPN. That's the only way I can think of that a device behind a firewall could get an external IP. At least everything you've stated sounds like a VPN connection to me.

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#2
January 3, 2020 at 17:28:27

I'm not using the Pi as a client. I'm using at as a PiVPN server.

What I need to figure out is why the Pi is the only device behind my router that is obtaining a random external IP, instead of using the static address assigned to me. My remote clients ought to be able to find the Pi at the fixed address through the appropriate forwarded ports. Is there some DHCP setting that needs tweaking?


Report •

#3
January 4, 2020 at 00:23:12
What is the address range of your network?

What is the "random external IP" address that your Pi is getting (as listed by ifconfig)?

Assuming it is using DHCP, then the address can only be one served by your internal DHCP server or one indicating that an IP address cannot be obtained (a link local address of the form 169.254.xxx.xxx) as - in general - DHCP is not relayed across routers.

(Edit: Note that the Pi will not obtain the fixed external address; it should have an address on your internal network and port forwarding will be configured on the router to forward requests for a particular port to the anternal address.)

message edited by ijack


Report •

Related Solutions

#4
January 4, 2020 at 16:12:24

The random external address is 209.234.xxx.xxx. I believe this is a dynamic address assigned by the ISP, as opposed to the static external address the rest my devices show. I can access my file server remotely via https using the fixed address, so I know the address is working.

On the LAN side, I use 192.168.xxx.xxx. The Pi has a fixed internal address on the LAN, I forward ports to that address, and can SSH to the Pi at that address (from a PC on the LAN). So the problem is that the Pi for whatever reason is receiving or grabbing onto a different external IP than all my other devices, despite being behind the same router.


Report •

#5
January 5, 2020 at 07:28:29
✔ Best Answer
I suspect you've configured your Pi incorrectly. From the sounds of it, the Pi is going out and getting an IP from DHCP somewhere outside your LAN. This is VPN client behavior. You need to check the setup on your Pi and ensure you have it set to "VPN server".

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***

message edited by Curt R


Report •

Ask Question