I just want to verify which ports are open on my mobile device when it's connected to the internet over 4g, but simply netcatting or even pinging it on it's "4g ip" address doesn't work. When connected over wifi, the ping & netcat to it's internal ip address work fine, and I'm also able to ping external ip addresses, so the issue doesn't lie with my own connectivity.
$ ping 192.168.1.100 PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data. 64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=248 ms 64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=32.6 ms
Got the phones ip address from whatismyip.com, and pinging it, I get
$ ping -4 82.132.xxx.xxx PING 82.132.xxx.xxx (82.132.xxx.xxx) 56(84) bytes of data. ^C --- 82.132.xxx.xxx ping statistics --- 23 packets transmitted, 0 received, 100% packet loss, time 22532ms
Just showing that pinging google works fine:
$ ping -v -4 google.com ping: socket: Permission denied, attempting raw socket... PING google.com (184.108.40.206) 56(84) bytes of data. 64 bytes from lhr25s12-in-f14.1e100.net (220.127.116.11): icmp_seq=1 ttl=53 time=3.71 ms 64 bytes from lhr25s12-in-f14.1e100.net (18.104.22.168): icmp_seq=2 ttl=53 time=3.07 ms
I'm guessing it's not possible to simply get routed to any mobile device even if you know it's IP address, so are there any other alternatives?