Skip to main content
13 of 31
deleted 187 characters in body
Agustin
  • 146
  • 12

Accessing a hotspot raspberry pi 3B+ and accessing network devices

I have a Raspberry Pi 3B+ which is working as a hotspot using a Hologram Nova usb modem where it receives Internet from and routes the internet through WiFi and Ethernet. This Hologram usb modem does not allow port forwarding so can't play around with ports.

I have realized that the IP address on the Pi changes every time the Pi reboots, Given that it's a mobile SIM, the cellphone company does not assign a permanent IP address. This makes it very hard or impractical to connect through SSH or access the local network.

The pi hotspot's local IP address is 192.168.4.1; however it uses a bridge with a range of 192.168.50.0/24 that work or route both wlan0 and eth0 interfaces. The pi hotspot also has another network interface in the form of ppp0 (which is the one that enables the data). All devices connected to the hotspot via wlan0 or eth0 obtain an ip in the range of the 192.168.50.0/24.

I was thinking of creating a home VPN using Pi VPN (different Pi, located at home and acting as a server), and have the RPI hotspot connect to the RPI VPN (at home) using PiVPN as a client. There is no tunnel installed in the RPI hotspot as of yet.

The purpose of this is so that once the hotspot is connected to the vpn, I can see the pi and all the other devices connected to it on my local network using either FING (phone app) or nmap (linux) or any type of ip scanner application.

I'm stuck in this. I have installed a no-ip client to get access to the Pi's public IP, but I haven't been able to ssh to the hotspot using the public IP.

Edit: I have removed the no-ip client. And I am just past step # 2 on Ingo's Answer.

I also installed the client VPN part however when I run the client and access the hotspot, and run the ip scanner app, I don't see attached devices.

Result of ip addr:

pi@PiHotspot:~ $ ip addr


1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host 
valid_lft forever preferred_lft forever


2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
link/ether b8:27:eb:3f:0e:89 brd ff:ff:ff:ff:ff:ff


3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether a2:ca:5d:28:2f:a8 brd ff:ff:ff:ff:ff:ff
inet 192.168.50.1/24 brd 192.168.50.255 scope global br0
   valid_lft forever preferred_lft forever
inet6 fe80::a0ca:5dff:fe28:2fa8/64 scope link 
   valid_lft forever preferred_lft forever


4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
link/ether b8:27:eb:6a:5b:dc brd ff:ff:ff:ff:ff:ff
inet6 fe80::ba27:ebff:fe6a:5bdc/64 scope link 
   valid_lft forever preferred_lft forever


5: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 3
link/ppp 
inet XX.XX.X.XXX/32 scope global ppp0
   valid_lft forever preferred_lft forever

Result of ip route:

pi@PiHotspot:~ $ ip route


default via XX.XX.X.XXX dev ppp0 proto static 
XX.XXX.X.X/16 via XX.XX.X.XXX dev ppp0 proto static 
XX.XXX.X.X/16 via XX.XX.X.XXX dev ppp0 proto static 
192.168.50.0/24 dev br0 proto kernel scope link src 192.168.50.60                                                                   
                                                                                        

Thank you kindly!

Agustin
  • 146
  • 12