How to ping mobile device when it's on 4g network

Maikol

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 (216.58.204.46) 56(84) bytes of data.
64 bytes from lhr25s12-in-f14.1e100.net (216.58.204.46): icmp_seq=1 ttl=53 time=3.71 ms
64 bytes from lhr25s12-in-f14.1e100.net (216.58.204.46): 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?

user1686

Many mobile operators implement CGNAT, and the external address seen by websites does not belong to the device – it belongs to the NAT gateway run by the ISP. So don't trust the address unless you see it on the device itself.

On top of that, most mobile operators do not provide dedicated IP addresses – they perform "1:many" NAT, not just 1:1 NAT, and the external address is simultaneously used by multiple customers (just like your home router shares your external addresses between all LAN devices).

Even those operators which do dedicate an address per customer (whether direct or 1:1 NATed) frequently put it behind a firewall which blocks all incoming connections. This has two purposes – it prevents the customer from hosting services on their 4G connection (which is usually not allowed by their terms of service), and it prevents various botnet scans and unsolicited connections from draining the device's battery.

and I'm also able to ping external ip addresses

Most of the time, you're only pinging the NAT gateway, not the device itself.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

4G LTE router network - ping works but no internet in browser on any connected device

From Dev

Is it possible to access a server's IIS on home network from an android device 4G network via VPN?

From Dev

How to enable mobile network( 3G/4G ) in iOS by program?

From Dev

Is it possible to simulate 4G network in iPhone Simulator or device?

From Dev

udev: Issue with a rule for a PCIe 4G network device

From Dev

Using 4G mobile router to create my home network

From Dev

Android: app cant ping device on wifi network when connecting in the app

From Dev

How to make bonding using mobile broadband 4g dongles

From Dev

Ping test a device in remote network

From Dev

How to centre modal for mobile device that's zoomed in

From Dev

How to enable ping of this network?

From Dev

Is there a way to force a network connection over 4G, even when WiFi is enabled and connected?

From Dev

Is there a way to force a network connection over 4G, even when WiFi is enabled and connected?

From Dev

How can I emulate 4G (LTE) network in Android SDK

From Dev

How can I emulate 4G (LTE) network in Android SDK

From Dev

Have 4g home network and want to expand ethernet ports wirelessly... how?

From Dev

React Native: "Network request failed" only when using network shared from iPhone 4G/LTE personal hotspot

From Dev

How to change text of element when on mobile device Javascript

From Dev

How do mobile phone companies detect if you are sharing your 3G/4G internet connection?

From Dev

Check mobile network data available in the android device

From Java

How do I solve "Incompatible launch template: The network interface's device index must be zero" when updating a CloudFormation template?

From Dev

QEMU how to ping host network?

From Dev

how to display text message in app when device is Network is off and On

From Dev

How to have a device's IP discovered in a network in a simple manner?

From Dev

Four digit hash is showing up before each php include when using AT&T 4G network

From Dev

Can't ping when Mobile Hotspot is enable

From Dev

How to remove or shorten F1 Boot Prompt on NanoBSD 4G USB disk that fail with "fdisk: /boot/mbr: Device not configured"?

From Dev

Impossible to ping when activating second network card

From Dev

Impossible to ping when activating second network card

Related Related

  1. 1

    4G LTE router network - ping works but no internet in browser on any connected device

  2. 2

    Is it possible to access a server's IIS on home network from an android device 4G network via VPN?

  3. 3

    How to enable mobile network( 3G/4G ) in iOS by program?

  4. 4

    Is it possible to simulate 4G network in iPhone Simulator or device?

  5. 5

    udev: Issue with a rule for a PCIe 4G network device

  6. 6

    Using 4G mobile router to create my home network

  7. 7

    Android: app cant ping device on wifi network when connecting in the app

  8. 8

    How to make bonding using mobile broadband 4g dongles

  9. 9

    Ping test a device in remote network

  10. 10

    How to centre modal for mobile device that's zoomed in

  11. 11

    How to enable ping of this network?

  12. 12

    Is there a way to force a network connection over 4G, even when WiFi is enabled and connected?

  13. 13

    Is there a way to force a network connection over 4G, even when WiFi is enabled and connected?

  14. 14

    How can I emulate 4G (LTE) network in Android SDK

  15. 15

    How can I emulate 4G (LTE) network in Android SDK

  16. 16

    Have 4g home network and want to expand ethernet ports wirelessly... how?

  17. 17

    React Native: "Network request failed" only when using network shared from iPhone 4G/LTE personal hotspot

  18. 18

    How to change text of element when on mobile device Javascript

  19. 19

    How do mobile phone companies detect if you are sharing your 3G/4G internet connection?

  20. 20

    Check mobile network data available in the android device

  21. 21

    How do I solve "Incompatible launch template: The network interface's device index must be zero" when updating a CloudFormation template?

  22. 22

    QEMU how to ping host network?

  23. 23

    how to display text message in app when device is Network is off and On

  24. 24

    How to have a device's IP discovered in a network in a simple manner?

  25. 25

    Four digit hash is showing up before each php include when using AT&T 4G network

  26. 26

    Can't ping when Mobile Hotspot is enable

  27. 27

    How to remove or shorten F1 Boot Prompt on NanoBSD 4G USB disk that fail with "fdisk: /boot/mbr: Device not configured"?

  28. 28

    Impossible to ping when activating second network card

  29. 29

    Impossible to ping when activating second network card

HotTag

Archive