I have three clustered servers, each with a distinct public IP address:
Although I am successfully retrieving data from Server 1 and Server 2, I am encountering an issue obtaining data from Server 3.
My virtual network is configured as follows:
You might be wondering why I've placed the VMs behind NAT in this manner. This approach is necessary because we cannot expose machines directly to the web, given that we are utilizing a third-party hosting provider. To the best of our knowledge, exposing more than one MAC address is not feasible. I welcome any suggestions for a more optimal solution.
Could someone provide guidance on the necessary routing changes to enable data retrieval from Server 3?
- Datacenter (Connected via InfluxDB)
- Server 1
- Some Machines and containers
- Server 2
- Some Machines and containers
- Server 3
- InfluxDB (Configured with the default port)
- Some Machines and containers
- Server 1
Although I am successfully retrieving data from Server 1 and Server 2, I am encountering an issue obtaining data from Server 3.
My virtual network is configured as follows:
Code:
auto vmbr0
iface vmbr0 inet static
address 192.168.13.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-down echo 0 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.13.0/24' -o enp6s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.13.0/24' -o enp6s0 -j MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
post-up iptables -t nat -A PREROUTING -i enp6s0 -p tcp --dport 80 -j DNAT --to-destination 192.168.13.107:80
post-down iptables -t nat -D PREROUTING -i enp6s0 -p tcp --dport 80 -j DNAT --to-destination 192.168.13.107:80
post-up iptables -t nat -A PREROUTING -i enp6s0 -p tcp --dport 443 -j DNAT --to-destination 192.168.13.107:443
post-down iptables -t nat -D PREROUTING -i enp6s0 -p tcp --dport 443 -j DNAT --to-destination 192.158.13.107:443
post-up iptables -t nat -A PREROUTING -i enp6s0 -p tcp --dport 8086 -j DNAT --to-destination 192.168.13.105:8086
post-down iptables -t nat -D PREROUTING -i enp6s0 -p tcp --dport 8086 -j DNAT --to-destination 192.158.13.105:8086
You might be wondering why I've placed the VMs behind NAT in this manner. This approach is necessary because we cannot expose machines directly to the web, given that we are utilizing a third-party hosting provider. To the best of our knowledge, exposing more than one MAC address is not feasible. I welcome any suggestions for a more optimal solution.
Could someone provide guidance on the necessary routing changes to enable data retrieval from Server 3?