Hi all, hope someone can give me some help with this.
I need masquerade as I am only allowed to use 1 mac for the server
My setup now (running just fine so far)
Nginx Proxy running on ip 10.0.0.1:80/433 (for future hosting purposes and loop back to voip web panel)
Game Server 10.0.0.3:2533
Hosting Server 10.0.0.2:80/433
Voip Server 10.0.0.100:5060
The problem now is that I can't get the voip server to work as it needs the public ip directly.
Is there a way to overhaul my configuration by giving the voip server my public ip, capturing some ports and forwarding them internally to other servers?
For example
Public IP assign Voip Server (and also an internal ip for internal communication)
Some ports intercepted and forwarded to other servers with an internal IP (other bridge?)
Voip server - Public ip and an internal ip (So that I can run the web pannel through nginx proxy)
Nginx proxy - Internal ip
Hosting server - Internal ip
Game server - Internal ip
See image for example
Kind regards
Michael
I need masquerade as I am only allowed to use 1 mac for the server
My setup now (running just fine so far)
Nginx Proxy running on ip 10.0.0.1:80/433 (for future hosting purposes and loop back to voip web panel)
Game Server 10.0.0.3:2533
Hosting Server 10.0.0.2:80/433
Voip Server 10.0.0.100:5060
Code:
auto lo
iface lo inet loopback
auto ens6
iface ens6 inet static
address PUBLIC IP/32
gateway PUBLIC GATEWAY IP
auto vmbr0
iface vmbr0 inet static
address 10.0.0.254/24
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 10.0.0.0/24 -o ens6 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 10.0.0.0/24 -o ens6 -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
# Poort 80 web to Proxy
post-up iptables -t nat -A PREROUTING -i ens6 -p tcp --dport 80 -j DNAT --to 10.0.0.1:80
post-down iptables -t nat -D PREROUTING -i ens6 -p tcp --dport 80 -j DNAT --to 10.0.0.1:80
# Poort 443 web to Proxy
post-up iptables -t nat -A PREROUTING -i ens6 -p tcp --dport 443 -j DNAT --to 10.0.0.1:443
post-down iptables -t nat -D PREROUTING -i ens6 -p tcp --dport 443 -j DNAT --to 10.0.0.1:443
# Poort 2533 to game server
post-up iptables -t nat -A PREROUTING -i ens6 -p tcp --dport 2533 -j DNAT --to 10.0.0.3:2533
post-down iptables -t nat -D PREROUTING -i ens6 -p tcp --dport 2533 -j DNAT --to 10.0.0.3:2533
# Poort 5060/50611 to voip server
post-up iptables -t nat -A PREROUTING -i ens6 -p tcp --dport 5060 -j DNAT --to 10.0.0.100:5060
post-down iptables -t nat -D PREROUTING -i ens6 -p tcp --dport 5060 -j DNAT --to 10.0.0.100:5060
post-up iptables -t nat -A PREROUTING -i ens6 -p udp --dport 5060 -j DNAT --to 10.0.0.100:5060
post-down iptables -t nat -D PREROUTING -i ens6 -p udp --dport 5060 -j DNAT --to 10.0.0.100:5060
The problem now is that I can't get the voip server to work as it needs the public ip directly.
Is there a way to overhaul my configuration by giving the voip server my public ip, capturing some ports and forwarding them internally to other servers?
For example
Public IP assign Voip Server (and also an internal ip for internal communication)
Some ports intercepted and forwarded to other servers with an internal IP (other bridge?)
Voip server - Public ip and an internal ip (So that I can run the web pannel through nginx proxy)
Nginx proxy - Internal ip
Hosting server - Internal ip
Game server - Internal ip
See image for example
Kind regards
Michael
Attachments
Last edited: