#13971 closed defect (invalid)
Port forward guest ip not working
Reported by: | mwader | Owned by: | |
---|---|---|---|
Component: | network/NAT | Version: | VirtualBox 4.3.26 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Mac OS X |
Description
Im trying to port forward a host port to a specific guest ip and port. In my case forward host port 1123 to a server on the guest listening on 127.0.0.1 port 1123. Everything works fine if the server listen to any interface or the first adapters IP.
If I specify 127.0.0.1 as guest IP for the port forward seems to be skipped as I see no "NAT: set redirect TCP host" in the log. If I specify 0.0.0.0 as guest IP it seems to fallback to the first adapters IP. Maybe this is a limit of how redirects work, need to have a destination IP?
A similar issue can be found here https://superuser.com/questions/767109/virtualbox-port-forward-not-working-when-guest-ip-is-specified-while-doc-says
Im configuring using vagrant but if i look in the GUI and with VBoxManage everything looks to be configured correctly:
NIC 1 Rule(1): name = tcp1123, protocol = tcp, host ip = 127.0.0.1, host port = 1123, guest ip = 128.0.0.1, guest port = 1123
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
127.0.0.1
is a loopback address. It cannot be accessed from another machine. You cannot setup port-forwarding to it.
comment:3 by , 10 years ago
Aha ok i thought the guest connection was done from within the guest thru the guest extension somehow. So it works more like the part of vb doing the port forwarding is on the same lan as the guest?
So the reason vb ignores the port forward is that the guest_ip is not within any of the subnets connected to the guest?
The VBoxManage showvminfo should be:
NIC 1 Rule(1): name = tcp1123, protocol = tcp, host ip = 127.0.0.1, host port = 1123, guest ip = 127.0.0.1, guest port = 1123
128.0.0.1 or 127.0.0.1 makes no difference. Seems ignored.