Answer the question
In order to leave comments, you need to log in
Set up Debian port forwarding?
There is a machine with Proxmox with an external IP, there is a virtual machine with Centos, the network between Proxmox and Centos is configured, NAT is also configured, you need to configure port 80 forwarding, port 22 has been forwarded, 80, by analogy, does not want to.
I do this:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.0.2:80
Output iptables rules:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere tcp dpt:http to:192.168.0.2: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 all -- 192.168.0.0/24 anywhere
Answer the question
In order to leave comments, you need to log in
Most likely, port 80 is already occupied, since Proxmox, if my memory serves me, has an admin panel hanging there. It is necessary to transfer the admin panel to another port and then forward it to the freed 80th.
Check:nestat -lptun | grep :80
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question