User Tools

Site Tools


openvz_proxmox_nat

This is an old revision of the document!


1/ define vmbr1 in proxmox interface :

192.168.0.254
255.255.255.0

2/ execute in host :

Get access to the outside

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o vmbr0 -j SNAT --to xxx.xxx.xxx.xxx

get access from the outside

iptables -t nat -A PREROUTING -p tcp -d xxx.xxx.xxx.xxx --dport xxx -i vmbr0 -j DNAT --to-destination 192.168.0.1:xxx

or

iptables -t nat -A PREROUTING -p tcp -d xxx.xxx.xxx.xxx --dport 10000:10100 -i vmbr0 -j DNAT --to-destination 192.168.0.1
iptables -t nat -A PREROUTING -p udp -d xxx.xxx.xxx.xxx --dport 10000:10100 -i vmbr0 -j DNAT --to-destination 192.168.0.1

<p>

Source Source Source

openvz_proxmox_nat.1485873312.txt.gz · Last modified: (external edit)