nodes/home.router: add port forwarding for home.nas
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
c8272b933a
commit
10732efa36
1 changed files with 5 additions and 0 deletions
|
@ -38,10 +38,15 @@ nodes['home.router'] = {
|
||||||
},
|
},
|
||||||
'iptables': {
|
'iptables': {
|
||||||
'custom_rules': [
|
'custom_rules': [
|
||||||
|
# This is a router. Allow forwarding traffic for all internal networks.
|
||||||
'iptables_both -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT',
|
'iptables_both -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT',
|
||||||
'iptables_both -A FORWARD -i enp1s0.23 -o enp1s0.42 -j REJECT',
|
'iptables_both -A FORWARD -i enp1s0.23 -o enp1s0.42 -j REJECT',
|
||||||
'iptables_both -A FORWARD -i enp1s0.23 -j ACCEPT',
|
'iptables_both -A FORWARD -i enp1s0.23 -j ACCEPT',
|
||||||
'iptables_both -A FORWARD -i enp1s0.42 -j ACCEPT',
|
'iptables_both -A FORWARD -i enp1s0.42 -j ACCEPT',
|
||||||
|
|
||||||
|
# External port 2022 should be home.nas
|
||||||
|
'iptables -t nat -A PREROUTING -p tcp --dport 2022 -j DNAT --to 172.19.138.20:22',
|
||||||
|
'iptables -A FORWARD -p tcp -d 172.19.138.20 --dport 22 -j ACCEPT',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'nameservers': atomic({
|
'nameservers': atomic({
|
||||||
|
|
Loading…
Reference in a new issue