Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a windows 2k8 server vm on my Ubuntuserver which I use for i.e terraria & apache. It was working great before a little minor accident when the electricity stopped flowing through the cables which ended up killing the server. When I booted it up again all the portforwarding rules in iptables was gone. Isn't iptables-save suppose to be enough?

Well, I tried to set it up again by forwarding 8888 to 80. Which didn't work.

sudo iptables -t nat -A PREROUTING -d 192.168.0.113 -p tcp --dport 8888 -j DNAT --to-destination 192.168.122.40:80

Tried changing -d 192.168.0.113 to -i eth1 which didnt work either.

The VM is online (I can vnc in through Chicken VNC) and has access to interwebs and network. I can even ping it from the host. But why cant I get the host to forward these ports to it? The host is accepting everything so the port isnt blocked.

$ sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DNAT       tcp  --  anywhere             192.168.0.113       tcp dpt:8888 to:192.168.122.40:80 

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  tcp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535 
MASQUERADE  udp  --  192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535 
MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24    

Any ideas?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.