2

I am using Ubuntu 13.10 in vmware on my Windows PC. So the problem is: when I see my IP using ifconfig command then it shows 198.168.33.180, but when I see my IP on whatismyip.com (on Ubuntu), it shows my IP 37.x.x.x. Is there any way to resolve this? I don't want this IP address 198.168.33.180 to be shown using ifconfig command for some reasons. Please help. Thanks in advanced.

1
  • Is the ip you get as 37.x.x.x from the host or the guest?
    – jobin
    Mar 27, 2014 at 17:55

1 Answer 1

2

198.168.33.180 is your IP address on the local network. whatismyip is telling you the address that is facing the outside network (the internet). Moreover, since you are in a VM, depending on your settings this IP(198.168.33.180) is in a specific range that is only seen locally by the host machine then is translated by the host using NAT. Then your router translates this address to your outward facing address that whatismyip is telling you.

So there's not really anything to resolve. Its just how networking works.

If you want the VM to be available on the local network you should use a bridged connection. Vmware has alot of documentation on this, and varies depending on the exact vmware solution your using, so I'll let you do the research but its pretty straightfoward.

Basically:

Edit the machine settings. Go to the network card and choose Bridged.

To test if you are set up correctly run ipconfig on the host and ifconfig on the VM. The gateways should match.

6
  • Thx for the answer, so it means there's no way?
    – user228046
    Mar 27, 2014 at 17:59
  • Not really. What are you trying to acheive
    – Dan
    Mar 27, 2014 at 18:10
  • I'm using metasploit reverse_tcp_handler payload, for that I have to set LHOST 198.168.33.180 (if I set the real IP then it gives error that I dont known that IP). Now I'm having problem with this. None can visit 198.168.33.180 from his machine.. That's why I wanna change my local IP to real IP.
    – user228046
    Mar 27, 2014 at 18:16
  • Ok I see what your getting at. forget about the address from whatismyip and check my edit.
    – Dan
    Mar 27, 2014 at 18:26
  • Its not the same. its still 198.168.33.180
    – user228046
    Mar 27, 2014 at 18:37

You must log in to answer this question.

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