Answer the question
In order to leave comments, you need to log in
Why is the guest system not accessible by external IP to itself?
Hello dear community!
There was the following problem, which could not be solved with a swoop:
There is an Ubuntu host running Windows on it in VirtualBox.
Host network address 192.168.1.1/24 (interface br0). The network on VirtualBox is raised in the virtual host adapter mode: the address of the virtual adapter is 192.168.56.1/24 (vboxnet0 interface), the address of the guest system's network adapter itself is 192.168.56.2/24.
In total, in order for the machine to be visible from the local network of the host (192.168.1.0/24), a number of rules have been created for iptables:
iptables -A INPUT -i br0 -p tcp -m tcp --dport 8081 -j ACCEPT
iptables -A FORWARD -p tcp -m tcp --dport 8081 -j ACCEPT
iptables -A PREROUTING -p tcp -m tcp --dport 8081 -j DNAT --to-destination 192.168.56.2:8081
iptables -t nat -A POSTROUTING -d 192.168.56.2 -p tcp --dport 8081 -j MASQUERADE
Answer the question
In order to leave comments, you need to log in
Can it be easier to transfer the network to Bridged mode and close the extra ports with a firewall directly in windows?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question