วันเสาร์ที่ 18 มกราคม พ.ศ. 2557

How to access local server on virtual machine

You have installed Linux virtual machine and you're creating application server. And you can't connect to it. 

Environment

  • Install Linux VM, such as Redhat, Ubuntu, Debian and etc.

Solution 

  • Check your IP both the Windows and the Linux VM must be the same subnet.
    • For Widows 
      • ipconfig /all
    • For Linux 
      • ifconfig -a
  • Close firewall on windows.
  • Close firewall on Linux
    • run /etc/init.d/iptables stop

  • And then, Test connection by telnet command.
    • run telnet [ip server] [port server] in client side. 
      • ex. telnet 192.168.126.131 9090 
    • You can snoop data packet with tcpdump in server side.
      • ex. tcpdump -s 0 -i eth0 port 9090