0

The problem

Recently my ISP gave my home a new IP address. I run a program on the Raspberry Pi that connects to some external APIs that have my home IP address whitelisted. After the IP change, a few of those APIs have started to report "IP forbidden".

This is funny, because when I run the same program with the same configuration from my laptop, connecting from the same home network, I do not get that error. How can it be that external servers recognize my laptop as operating from my home IP, but not my Pi?

IP cache?

I'm not so well known with whatever might be cached internally on the Pi, but I do know that the public IP address must be the same when connecting to the outside world through the same modem. Also when I make a request to a public server which gives me back my IP address, it does give back the home IP address.

iptables?

I am running fail2ban. No clue if that could be setting some rules that would influence this. As said before, I have no idea how that could influence the public IP address, but who knows. I am not a connaisseur.

Ethernet device has no hostname

Mildly interesting observation: my ethernet device in my router shows up without hostname; only the WiFi device is called "raspberrypi". When I disable WiFi, I cannot find the Pi by hostname. However, re-enabling it makes it findable again.

Any thoughts/advice on what could be up here causing my Pi to not be recognized by the external servers to operate on the same IP as the rest of my house, would be much appreciated. My next step would be to reinstall the Pi from scratch to see if that helps. The Pi runs Raspbian.

5
  • what is your specific question?
    – jsotola
    May 29, 2022 at 20:01
  • My question is if anybody has a clue what might be causing my Pi not to be recognized by external servers as operating from the same IP as the rest of my house.
    – minitauros
    May 31, 2022 at 8:22
  • There should be no difference assuming your router is set up to use NAT. Which ip addresses are they rejecting? The pi and Laptop must present the same address to those services if you are using NAT. Those External API are somewhere else on the internet I take it and not on you local net. Reinstalling the Pi won't help May 31, 2022 at 19:51
  • Ask google for your ip on both devices. To see what the outside probably sees.
    – Abel
    Jun 1, 2022 at 4:16
  • I asked ipify.org and the Pi and my laptop both report the same address. Still the IP being rejected started happening only after my ISP changed my IP. I also don't really understand, that's why I was hoping for someone with a magic insight :). Perhaps the APIs (public internet, indeed) are just not doing their job right.
    – minitauros
    Jun 1, 2022 at 16:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.