First Time NAT Port Forwarding not working as expected (ANSWERED)
Posted: 13. Oct 2016, 15:03
This is a first venture into accessing web services on the guest via the host. I am using NAT port forwarding which is failing as explained in the setup/scenario detailed below. I believe I am trying something straightforward, but accept I may be misunderstanding some basic principle. I have been drawn into various other forum posts on the same subject but find the specifics of each case do not help me. Would appreciate any guidance - Thanks
So the basic set-up is:
VirtualBox 5.1.6
Host OS = Windows7
Guest OS = Linux 6.8
And these are the details leading to my bad test:
1. From within the Linux guest, ifconfig shows this:
eth0 Link encap:Ethernet HWaddr 08:00:27:CB:72:DB
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00
fecb:72db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1117801 errors:0 dropped:0 overruns:0 frame:0
TX packets:302665 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1406849964 (1.3 GiB) TX bytes:18307823 (17.4 MiB)
2. From within the guest, I can successfully access the web service via a browser using the IP address from 1 above:
//10.0.2.15:19000/aps
3. Port forwarding is set up like this:
Name: ToVMGuest
Protocol: TCP
Host IP: 127.0.0.1
Host Port: 19000
Guest IP: 10.2.0.15
Guest Port: 19000
4. And netstat on the Windows host shows me the following:
netstat -na | find "19000"
TCP 127.0.0.1:19000 0.0.0.0:0 LISTENING
5. NAT details from Vbox.log (attached) include the following:
00:00:01.150368 NAT: Guest address guess set to 10.0.2.15 by initialization
00:00:01.158116 NAT: Set redirect TCP 127.0.0.1:19000 -> 10.0.2.15:19000
6. BUT, when trying a connection like this via a browser to the same web service from the Windows host it fails - "This page can't be displayed"
//127.0.0.1:19000/aps
So the basic set-up is:
VirtualBox 5.1.6
Host OS = Windows7
Guest OS = Linux 6.8
And these are the details leading to my bad test:
1. From within the Linux guest, ifconfig shows this:
eth0 Link encap:Ethernet HWaddr 08:00:27:CB:72:DB
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1117801 errors:0 dropped:0 overruns:0 frame:0
TX packets:302665 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1406849964 (1.3 GiB) TX bytes:18307823 (17.4 MiB)
2. From within the guest, I can successfully access the web service via a browser using the IP address from 1 above:
//10.0.2.15:19000/aps
3. Port forwarding is set up like this:
Name: ToVMGuest
Protocol: TCP
Host IP: 127.0.0.1
Host Port: 19000
Guest IP: 10.2.0.15
Guest Port: 19000
4. And netstat on the Windows host shows me the following:
netstat -na | find "19000"
TCP 127.0.0.1:19000 0.0.0.0:0 LISTENING
5. NAT details from Vbox.log (attached) include the following:
00:00:01.150368 NAT: Guest address guess set to 10.0.2.15 by initialization
00:00:01.158116 NAT: Set redirect TCP 127.0.0.1:19000 -> 10.0.2.15:19000
6. BUT, when trying a connection like this via a browser to the same web service from the Windows host it fails - "This page can't be displayed"
//127.0.0.1:19000/aps