Hello all,
Following various guides around the Internet, my /etc/interfaces/network file has come to look like this...
This all works. I am able to access the Internet, use TeamViewer, etc. on my Windows Server (IP: 10.99.0.7) (connected to vmbr1)
However, when I go to add this to forward services such as IIS and RDP...
...the Internet on the VM stops working and non of the ports actually forward (for example, RDP runs on port 3389, however, I cannot access it outside on port 4489 on my only outside IP).
What exactly am I doing wrong here?
-- Josh
Following various guides around the Internet, my /etc/interfaces/network file has come to look like this...
Code:
# network interface settings
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 62.210.139.3
netmask 255.255.255.0
gateway 62.210.139.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
#auto vmbr0:0
#iface vmbr0:0 inet static
#address 192.168.4.1
#netmask 255.255.255.0
#network 192.168.4.0
#broadcast 192.168.4.255
auto vmbr1
iface vmbr1 inet static
address 10.99.0.254
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
# Turn on Port Forwarding
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
# Set VMs to Masquerade
post-up iptables -t nat -A POSTROUTING -s '10.99.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.99.0.0/24' -o vmbr0 -j MASQUERADE
This all works. I am able to access the Internet, use TeamViewer, etc. on my Windows Server (IP: 10.99.0.7) (connected to vmbr1)
However, when I go to add this to forward services such as IIS and RDP...
Code:
# Forward Ports
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 4489 -j DNAT --to-destination 10.99.0.7:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 4489 -j DNAT --to-destination 10.99.0.7:3389
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 81 -j DNAT --to-destination 10.99.0.7:80
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 81 -j DNAT --to-destination 10.99.0.7:80
...the Internet on the VM stops working and non of the ports actually forward (for example, RDP runs on port 3389, however, I cannot access it outside on port 4489 on my only outside IP).
What exactly am I doing wrong here?
-- Josh
Last edited:



