0

I use the smartphone USB dethering internet.

The same is true when connecting through an internal router.

Only the internal network IP is found, and the real IP is not visible.

How can i find it.

ifconfig

enp0s20f0u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.42.228  netmask 255.255.255.0  broadcast 192.168.42.255
        inet6 fe80::1e25:40f2:93d6:20fa  prefixlen 64  scopeid 0x20<link>
        ether 42:39:19:9d:ea:b3  txqueuelen 1000  (Ethernet)
        RX packets 8831  bytes 6881241 (6.8 MB)
        RX errors 3  dropped 0  overruns 0  frame 3
        TX packets 7230  bytes 1269771 (1.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f4:8e:38:ee:82:17  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2002  bytes 137278 (137.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2002  bytes 137278 (137.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
iyagi
  • 711
  • This is not Ubuntu related. You can find the real ip on some web sites that show your ip. For example https://whatismyipaddress.com/ – Pilot6 Jul 08 '18 at 09:42

2 Answers2

1

Install curl first:

sudo apt install curl

Issue command in terminal afterwards to get your public IP:

curl ipinfo.io/ip
Bob
  • 2,533
0

In terminal: curl icanhazip.com