Hi,
I want to forward the ports to specific VM/LXCs. To do this, `/etc / network / interfaces`
I made changes but still no redirects.
Is there a mistake here?
I want to forward the ports to specific VM/LXCs. To do this, `/etc / network / interfaces`
I made changes but still no redirects.
Is there a mistake here?
Code:
auto lo
iface lo inet loopback
iface enp3s0 inet manual
iface enp5s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 178.20.154.222
netmask 255.255.255.0
gateway 178.20.154.254
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A PREROUTING -i vmbr0 -d 178.20.154.222 -p tcp --dport 80 -j DNAT --to 192.168.128.198:80
post-up iptables -t nat -A PREROUTING -i vmbr0 -d 178.20.154.222 -p tcp --dport 443 -j DNAT --to 192.168.128.198:443
post-up iptables -t nat -A PREROUTING -i vmbr0 -d 178.20.154.222 -p tcp --dport 2030 -j DNAT --to 192.168.128.186:2030
post-up iptables -t nat -A PREROUTING -i vmbr0 -d 178.20.154.222 -p tcp --dport 2031 -j DNAT --to 192.168.128.186:2031
post-up iptables -t nat -A PREROUTING -i vmbr0 -d 178.20.154.222 -p tcp --dport 8080 -j DNAT --to 192.168.128.198:8080
#post-up iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.128.186:80
#post-down iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.128.186:80
HAproxy | 100 | 192.168.128.198 |
Web server | 101 | 129.168.128.186 |
Mattermost | 102 | 192.168.128.182 |