P
P
Pavel Nikitin2016-05-01 19:31:01
Debian
Pavel Nikitin, 2016-05-01 19:31:01

POSTROUTING not working, how to forward ports?

How to make the game server running on the guest machine visible from the outside?
Proxmox.HOST (Debian)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
address 100.132.233.41
netmask 255.255.255.0
gateway 100.132.233.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
inetace2
address.vmbr1 .1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
Port forwarding
iptables -A PREROUTING -t nat -i vmbr0 -p udp -d 100.132.233.41 --dport 22000 -j DNAT --to 192.168.1.1:22000
iptables -A PREROUTING -t nat -i vmbr0 - p tcp -d 100.132.233.41 --dport 20000 -j DNAT --to 192.168.1.1:20000
With these settings, the server is not displayed in monitoring.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-05-01
@opium

Try to write eth0 and look at which piece does not work with tisipidump

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question