ok sound simple should be simple but somethings going wrong simply want to forward set ports to the vms. heres what i got so far
if i do
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address Public_ip
netmask 24
gateway Public_GW
bridge-ports eno1
bridge-stp off
bridge-fd 0
#private sub network
auto vmbr1
iface vmbr1 inet manual
address 192.168.4.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.4.0 -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 192.168.4.0 -o eno1 -j MASQUERADE
# post-up iptables -t nat -A PREROUTING -i vmbr1 -p tcp --dport 3390 -j DNAT --to 192.168.4.2:3389
# post-down iptables -t nat -D PREROUTING -i vmbr1 -p tcp --dport 3390 -j DNAT --to 192.168.4.2:3389
# post-up iptables -t nat -A PREROUTING -i vmbr1 -p udp--dport 6677 -j DNAT --to 192.168.4.2:6677
# post-down iptables -t nat -D PREROUTING -i vmbr1 -p udp --dport 6677 -j DNAT --to 192.168.4.2:6677
every connection gets reset. im either missing something or getting something in the wrong order
if i do
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address Public_ip
netmask 24
gateway Public_GW
bridge-ports eno1
bridge-stp off
bridge-fd 0
#private sub network
auto vmbr1
iface vmbr1 inet manual
address 192.168.4.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.4.0 -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 192.168.4.0 -o eno1 -j MASQUERADE
# post-up iptables -t nat -A PREROUTING -i vmbr1 -p tcp --dport 3390 -j DNAT --to 192.168.4.2:3389
# post-down iptables -t nat -D PREROUTING -i vmbr1 -p tcp --dport 3390 -j DNAT --to 192.168.4.2:3389
# post-up iptables -t nat -A PREROUTING -i vmbr1 -p udp--dport 6677 -j DNAT --to 192.168.4.2:6677
# post-down iptables -t nat -D PREROUTING -i vmbr1 -p udp --dport 6677 -j DNAT --to 192.168.4.2:6677
every connection gets reset. im either missing something or getting something in the wrong order
Last edited: