update forwarding ip
This commit is contained in:
@@ -118,13 +118,13 @@ in {
|
|||||||
iptables -t nat -F
|
iptables -t nat -F
|
||||||
|
|
||||||
# DNAT: internet -> homelab over tailscale
|
# DNAT: internet -> homelab over tailscale
|
||||||
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 7567 -j DNAT --to-destination ${snowbelle_ip}:7567 # gitea ssh
|
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 7567 -j DNAT --to-destination ${lumiose_ip}:7567 # gitea ssh
|
||||||
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25777 -j DNAT --to-destination ${snowbelle_ip}:25777 # recpro mc
|
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25777 -j DNAT --to-destination ${snowbelle_ip}:25777 # recpro mc
|
||||||
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 25777 -j DNAT --to-destination ${snowbelle_ip}:25777 # recpro mc
|
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 25777 -j DNAT --to-destination ${snowbelle_ip}:25777 # recpro mc
|
||||||
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25778 -j DNAT --to-destination ${snowbelle_ip}:25778 # cbblemon mc
|
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25778 -j DNAT --to-destination ${snowbelle_ip}:25778 # cbblemon mc
|
||||||
|
|
||||||
# SNAT: ensure replies go back through VPS tailscale IP
|
# SNAT: ensure replies go back through VPS tailscale IP
|
||||||
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 7567 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # gitea ssh
|
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 7567 -d ${lumiose_ip}/32 -j SNAT --to-source ${vpsip4} # gitea ssh
|
||||||
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25777 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
|
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25777 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
|
||||||
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 25777 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
|
iptables -t nat -A POSTROUTING -o tailscale0 -p udp --dport 25777 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # recpro mc
|
||||||
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25778 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # cbblemon mc
|
iptables -t nat -A POSTROUTING -o tailscale0 -p tcp --dport 25778 -d ${snowbelle_ip}/32 -j SNAT --to-source ${vpsip4} # cbblemon mc
|
||||||
@@ -155,19 +155,19 @@ in {
|
|||||||
# this is instead of forwarding all 80 & 443 traffic to have more explicit
|
# this is instead of forwarding all 80 & 443 traffic to have more explicit
|
||||||
# publishing things to the open web
|
# publishing things to the open web
|
||||||
"media.${homelab.public_domain}".extraConfig = ''
|
"media.${homelab.public_domain}".extraConfig = ''
|
||||||
reverse_proxy 10.10.0.10:7100
|
reverse_proxy ${lumiose_ip}:7100
|
||||||
'';
|
'';
|
||||||
"pass.${homelab.public_domain}".extraConfig = ''
|
"pass.${homelab.public_domain}".extraConfig = ''
|
||||||
reverse_proxy 10.10.0.10:7701
|
reverse_proxy ${lumiose_ip}:7701
|
||||||
'';
|
'';
|
||||||
"photos.${homelab.public_domain}".extraConfig = ''
|
"photos.${homelab.public_domain}".extraConfig = ''
|
||||||
reverse_proxy 10.10.0.10:7702
|
reverse_proxy ${lumiose_ip}:7702
|
||||||
'';
|
'';
|
||||||
"git.${homelab.public_domain}".extraConfig = ''
|
"git.${homelab.public_domain}".extraConfig = ''
|
||||||
reverse_proxy 10.10.0.10:7703
|
reverse_proxy ${lumiose_ip}:7703
|
||||||
'';
|
'';
|
||||||
"hass.${homelab.public_domain}".extraConfig = ''
|
"hass.${homelab.public_domain}".extraConfig = ''
|
||||||
reverse_proxy 10.10.0.10:7704 {
|
reverse_proxy ${lumiose_ip}:7704 {
|
||||||
header_up Host {host}
|
header_up Host {host}
|
||||||
header_up X-Real-IP {remote_host}
|
header_up X-Real-IP {remote_host}
|
||||||
header_up X-Forwarded-For {remote_host}
|
header_up X-Forwarded-For {remote_host}
|
||||||
|
|||||||
Reference in New Issue
Block a user