feat(firewall): node specific port-forwarding for ingress.tjo.cloud
This commit is contained in:
parent
955d18f078
commit
07a1da4410
4 changed files with 33 additions and 0 deletions
12
justfile
12
justfile
|
@ -29,11 +29,23 @@ deploy-config node ipv4_subnet ipv6_subnet:
|
||||||
|
|
||||||
for file in {{justfile_directory()}}/openwrt/etc/config/*
|
for file in {{justfile_directory()}}/openwrt/etc/config/*
|
||||||
do
|
do
|
||||||
|
# Skip node specific configs
|
||||||
|
if [[ "$file" == *\.* ]]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Deploying /etc/config/$(basename $file)"
|
echo "Deploying /etc/config/$(basename $file)"
|
||||||
export IPV4_SUBNET="{{ipv4_subnet}}"
|
export IPV4_SUBNET="{{ipv4_subnet}}"
|
||||||
export IPV6_SUBNET="{{ipv6_subnet}}"
|
export IPV6_SUBNET="{{ipv6_subnet}}"
|
||||||
export HOSTNAME="{{node}}.network.tjo.cloud"
|
export HOSTNAME="{{node}}.network.tjo.cloud"
|
||||||
cat $file | envsubst | tailscale ssh "root@{{node}}-network-tjo-cloud" "cat > /etc/config/$(basename $file)"
|
cat $file | envsubst | tailscale ssh "root@{{node}}-network-tjo-cloud" "cat > /etc/config/$(basename $file)"
|
||||||
|
|
||||||
|
# Deploy node specific configs
|
||||||
|
if [ -f "${file}.{{node}}" ]
|
||||||
|
then
|
||||||
|
cat "${file}.{{node}}" | envsubst | tailscale ssh "root@{{node}}-network-tjo-cloud" "cat >> /etc/config/$(basename $file)"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Reboot router in 5 seconds..."
|
echo "Reboot router in 5 seconds..."
|
||||||
|
|
7
openwrt/etc/config/firewall.batuu
Normal file
7
openwrt/etc/config/firewall.batuu
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
config redirect
|
||||||
|
option dest 'lan'
|
||||||
|
option target 'DNAT'
|
||||||
|
option name 'batuu.ingress.tjo.cloud'
|
||||||
|
option src 'wan'
|
||||||
|
option src_dport '1-1000'
|
||||||
|
option dest_ip '10.0.19.126'
|
7
openwrt/etc/config/firewall.jakku
Normal file
7
openwrt/etc/config/firewall.jakku
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
config redirect
|
||||||
|
option dest 'lan'
|
||||||
|
option target 'DNAT'
|
||||||
|
option name 'jakku.ingress.tjo.cloud'
|
||||||
|
option src 'wan'
|
||||||
|
option src_dport '1-1000'
|
||||||
|
option dest_ip '10.0.32.19'
|
7
openwrt/etc/config/firewall.nevaroo
Normal file
7
openwrt/etc/config/firewall.nevaroo
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
config redirect
|
||||||
|
option dest 'lan'
|
||||||
|
option target 'DNAT'
|
||||||
|
option name 'nevaroo.ingress.tjo.cloud'
|
||||||
|
option src 'wan'
|
||||||
|
option src_dport '1-1000'
|
||||||
|
option dest_ip '10.0.49.171'
|
Loading…
Reference in a new issue