0

I am using Sercuritykiss VPN in Kali Linux by adding a new VPN and connecting to it.

They are providing a gateway which is the address of the server and I use a server in France and it has an IP address of 37.59.xx.xx but when I check my public IP address in http://www.whatismypublicip.com/ it's showing the same address of the server.

I am trying to use beef over internet which requires my public IP address and am trying to find it. The reason I am using VPN is that I could not port forward as I am mobile connection and ISP blocks them.

Why are the IP addresses the same? Is there any other way to find my public IP address connected through VPN?

Routing table:

default via 10.12.0.13 dev tun0  proto static  metric 1024 
10.12.0.1 via 10.12.0.13 dev tun0  proto static  metric 1024 
10.12.0.13 dev tun0  proto kernel  scope link  src 10.12.0.14 
37.59.xx.xx via 192.168.43.1 dev wlan0  proto static  metric 10 
192.168.43.0/24 dev wlan0  proto kernel  scope link  src 192.168.43.20
2
  • Not clear. Are you complaining about the fact that, while connected to the VPN, your public IP is the same as that of your server? It should be, this is a feature. Also, are you trying to determine the public IP you would have, if you were not connected thru the VPN? This can be done, pls post your routing table, ip route show. Commented Nov 29, 2015 at 10:08
  • @MariusMatutiae updated my question with routing table
    – Sai Ram
    Commented Nov 29, 2015 at 10:17

2 Answers 2

2

You can find the public IP address you would have, if you were not on the VPN, with the following commands:

 sudo ip route add 64.182.208.185/32 via 192.168.43.1 dev wlan0
 curl 64.182.208.185

The first command establishes a special route, which applies only to the site icanhazip.com (=64.182.208.185), which completely bypasses the VPN. The second command queries the site, and the query returns, as simple text, only your IP address, nothing else.

2
  • Taking too long. Not showing any output. Now shown: curl: (52) Empty reply from server
    – Sai Ram
    Commented Nov 29, 2015 at 10:38
  • @SaiRam See correction of the code, at line 1. Commented Nov 29, 2015 at 11:24
0

The other answer is not anymore working because the IP address of icanhazip.com has changed.

Better to use this, obviously changing gateway and interface to your own:

sudo ip route add `dig +short icanhazip.com|tail -1`/32 via 192.168.1.254 dev enp3s0
curl icanhazip.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .