spookydillow
Posts: 2
Joined: Mon Jul 10, 2017 3:57 pm

Cant Ping Pi When On Mobile Broadband

Mon Jul 10, 2017 4:17 pm

Hi

I have a Raspberrypi3 that I want to be able to ssh into when its using a mobile broadband modem.

I can ssh into it when its connected to my home router easily enough and when I put it on the mobile broadband dongle it works fine where email and web are concerned. However despite knowing the mobile broadband ip address I can neither ping or ssh into it. I tried O2 sim cards but after finding they were behind a transparent proxy, switched to Asda mobile.

The sim cards are have both voice and data enabled.

Anyone know where I go from here?

Thanks for any ideas

jgreen71
Posts: 92
Joined: Wed May 01, 2013 12:29 pm
Location: Clarksville, IN

Re: Cant Ping Pi When On Mobile Broadband

Mon Jul 10, 2017 5:01 pm

Correct me if I'm wrong, but when connected to your local router, the IP is assigned by the router. When connected via the dongle, the IP is assigned by the ISP/cell provider.

Are you sure that they are not blocking the needed ports?

User avatar
DougieLawson
Posts: 37074
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Cant Ping Pi When On Mobile Broadband

Mon Jul 10, 2017 5:22 pm

Most (all) mobile ISPs are going to block ALL forwarded ports. They're also likely to have you behind a carrier grade NAT (to reduce the number of IPv4 addressed needed to support running their network).

So what you're trying to do is 100% impossible.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

fruitoftheloom
Posts: 21595
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Cant Ping Pi When On Mobile Broadband

Mon Jul 10, 2017 6:19 pm

spookydillow wrote:Hi

I have a Raspberrypi3 that I want to be able to ssh into when its using a mobile broadband modem.

I can ssh into it when its connected to my home router easily enough and when I put it on the mobile broadband dongle it works fine where email and web are concerned. However despite knowing the mobile broadband ip address I can neither ping or ssh into it. I tried O2 sim cards but after finding they were behind a transparent proxy, switched to Asda mobile.

The sim cards are have both voice and data enabled.

Anyone know where I go from here?

Thanks for any ideas
Use RealVNC Connect (one presumes you are running Raspbian Jessie with Desktop) and solve your issues:

https://www.raspberrypi.org/blog/get-ba ... c-connect/
Retired disgracefully.....
......to a more gentile life !

spookydillow
Posts: 2
Joined: Mon Jul 10, 2017 3:57 pm

Re: Cant Ping Pi When On Mobile Broadband

Tue Jul 11, 2017 4:21 pm

Thanks for your replies. Nothing is ever straight forward is it? I'll give the vnc suggestion a try.

pi_everalm
Posts: 33
Joined: Thu Apr 20, 2017 11:44 am

Re: Cant Ping Pi When On Mobile Broadband

Wed Jul 12, 2017 6:59 am

A slightly convoluted but perfectly functional way I use is via a Pi2 running PiVPN on my internal network

Setup OpenVPN on your internal network (I usually choose TCP using port 443 as it makes it easier to get through any proxy servers in the way)
Set up port forwarding on Network modem/cable modem/whatever your ISP has provided so external connection will go to your internal VPN server
Create client account, password (optional) and certificate (OVPN file) for your mobile equipped Pi
Install OpenVPN on your mobile equipped Pi and copy the OVPN file over
Write a small script that will open up the VPN connection after boot and on successful start of the modem (I usually makes sure the script turns off any network connection other than the modem one to reduce probability of conflict using 'ifdown")

Test at home first to troubleshoot....... 8-)

Depending on how you setup the network addressing, you can now either connect directly or via your VPN server from your internal network.

(Assumption is that your cable modem IP address does not change to frequently as you will have to edit/update or regenerate your OVPN file each time it changes)

drgeoff
Posts: 10205
Joined: Wed Jan 25, 2012 6:39 pm

Re: Cant Ping Pi When On Mobile Broadband

Wed Jul 12, 2017 7:52 am

pi_everalm wrote:A slightly convoluted but perfectly functional way I use is via a Pi2 running PiVPN on my internal network

Setup OpenVPN on your internal network (I usually choose TCP using port 443 as it makes it easier to get through any proxy servers in the way)
Set up port forwarding on Network modem/cable modem/whatever your ISP has provided so external connection will go to your internal VPN server
Create client account, password (optional) and certificate (OVPN file) for your mobile equipped Pi
Install OpenVPN on your mobile equipped Pi and copy the OVPN file over
Write a small script that will open up the VPN connection after boot and on successful start of the modem (I usually makes sure the script turns off any network connection other than the modem one to reduce probability of conflict using 'ifdown")

Test at home first to troubleshoot....... 8-)

Depending on how you setup the network addressing, you can now either connect directly or via your VPN server from your internal network.

(Assumption is that your cable modem IP address does not chang :mrgreen: e to frequently as you will have to edit/update or regenerate your OVPN file each time it changes)
How does any of that overcome the issues mentioned in other replies?

fruitoftheloom
Posts: 21595
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Cant Ping Pi When On Mobile Broadband

Wed Jul 12, 2017 7:53 am

pi_everalm wrote:A slightly convoluted but perfectly functional way I use is via a Pi2 running PiVPN on my internal network

Setup OpenVPN on your internal network (I usually choose TCP using port 443 as it makes it easier to get through any proxy servers in the way)
Set up port forwarding on Network modem/cable modem/whatever your ISP has provided so external connection will go to your internal VPN server
Create client account, password (optional) and certificate (OVPN file) for your mobile equipped Pi
Install OpenVPN on your mobile equipped Pi and copy the OVPN file over
Write a small script that will open up the VPN connection after boot and on successful start of the modem (I usually makes sure the script turns off any network connection other than the modem one to reduce probability of conflict using 'ifdown")

Test at home first to troubleshoot....... 8-)

Depending on how you setup the network addressing, you can now either connect directly or via your VPN server from your internal network.

(Assumption is that your cable modem IP address does not change to frequently as you will have to edit/update or regenerate your OVPN file each time it changes)
The OP is using 3G Mobile Broadband, differing scenario :roll:
Retired disgracefully.....
......to a more gentile life !

pi_everalm
Posts: 33
Joined: Thu Apr 20, 2017 11:44 am

Re: Cant Ping Pi When On Mobile Broadband

Wed Jul 12, 2017 8:20 pm

Read the relevant words

Install OpenVPN on your mobile equipped Pi and copy the OVPN file over
Write a small script that will open up the VPN connection after boot and on successful start of the modem (I usually makes sure the script turns off any network connection other than the modem one to reduce probability of conflict using 'ifdown")

Exact scenario as the OP wants to run.

fruitoftheloom
Posts: 21595
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Cant Ping Pi When On Mobile Broadband

Wed Jul 12, 2017 8:30 pm

pi_everalm wrote:Read the relevant words

Install OpenVPN on your mobile equipped Pi and copy the OVPN file over
Write a small script that will open up the VPN connection after boot and on successful start of the modem (I usually makes sure the script turns off any network connection other than the modem one to reduce probability of conflict using 'ifdown")

Exact scenario as the OP wants to run.
Set up port forwarding on Network modem/cable modem/whatever your ISP has provided so external connection will go to your internal VPN server

How is this feasible with a 3G USB Dongle ??
Retired disgracefully.....
......to a more gentile life !

Return to “Troubleshooting”