VirtualBox default IP address for NAT

Gosh.. I always forget this details >.< So better to create it on one post. This details will have to put manually if NAT is not working in your VirtualBox network.

IP address: 10.0.2.15
Netmask: 255.255.255.0
Default gateway: 10.0.2.2
DNS server: 10.0.2.3

How to change your IP address details on Windows
  • Go to start, control panel, double click on network connection (Windows XP) or Go to start, type network, click on network and sharing centre, click manage network connections on left menu (Windows Vista)
  • Right click on your nat network card then click on properties
  • Choose internet protocol / internet protocol version 4 from the middle box, and then click properties.
  • Click on use the following IP address and then change to the details I put above. See picture for more details


How to change your IP address on Linux
  • Go to terminal, type ifconfig eth0 up. (eth0 is you nat network card)
  • type ifconfig eth0 inet 10.0.2.15 netmask 255.255.255.0 and press enter
  • also you have to change file in /etc/resolv.conf. Type vi /etc/resolv.conf to open the file.
  • press 'i' to go to insert mode, change the nameserver to 10.0.2.3, press esc, then press ':wq' and then enter (all without single quote sign)
That's it. Hope I won't forget the next time I have to deal with this problem.


Comments

VinhCX said…
Great post, thanks!

Popular posts from this blog

Error code 8024001b (solved)

Enable PHP opcache extension on Windows XAMPP

Hiren can not load the CD ROM Driver