I have a Raspberry Pi device where I use a 4G modem (D-Link DWM-222) to connect it to the internet.
The interface PPP0 gets an IP and everything works great. I was thinking that I would get a public IP and be able to connect to this device over the internet. But when I try to ssh into it I just get “Connection timed out.”
I have another SIM-card from the same ISP that I use for my home network with a router. And there I’m able to forward a port to a device on my home network to enable SSH into it from the internet, and it just works. The router I use for my home network is a Huawei B535-333 hotspot and it takes a SIM card and connects to the 4G network.
So this led me to believe that I should be able to access my 4G connected Raspberry Pi device directly.
The IP I see when I type ifconfig is different from the one I see when I visit ifconfig.me
However in the 4G Router settings page it shows the same IP under "WAN-IP-adress" that I see when I visit ifconfig.me
What am I missing? How can I make this work?