bundles/{netdata,nginx,unbound}: fix iptables rules (should also create ip6tables rules)
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
e8d131b041
commit
03d3ab6e9d
3 changed files with 8 additions and 8 deletions
|
@ -23,10 +23,10 @@ def iptables(metadata):
|
||||||
|
|
||||||
if len(interfaces):
|
if len(interfaces):
|
||||||
for iface in sorted(interfaces):
|
for iface in sorted(interfaces):
|
||||||
iptables.append(f'iptables -A INPUT -i {iface} -p tcp --dport 19999 -j ACCEPT')
|
iptables.append(f'iptables_both -A INPUT -i {iface} -p tcp --dport 19999 -j ACCEPT')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
iptables.append('iptables -A INPUT -p tcp --dport 19999 -j ACCEPT')
|
iptables.append('iptables_both -A INPUT -p tcp --dport 19999 -j ACCEPT')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'iptables': {
|
'iptables': {
|
||||||
|
|
|
@ -140,12 +140,12 @@ def iptables(metadata):
|
||||||
|
|
||||||
if len(interfaces):
|
if len(interfaces):
|
||||||
for iface in sorted(interfaces):
|
for iface in sorted(interfaces):
|
||||||
iptables.append(f'iptables -A INPUT -i {iface} -p tcp --dport 80 -j ACCEPT')
|
iptables.append(f'iptables_both -A INPUT -i {iface} -p tcp --dport 80 -j ACCEPT')
|
||||||
iptables.append(f'iptables -A INPUT -i {iface} -p tcp --dport 443 -j ACCEPT')
|
iptables.append(f'iptables_both -A INPUT -i {iface} -p tcp --dport 443 -j ACCEPT')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
iptables.append('iptables -A INPUT -p tcp --dport 80 -j ACCEPT')
|
iptables.append('iptables_both -A INPUT -p tcp --dport 80 -j ACCEPT')
|
||||||
iptables.append('iptables -A INPUT -p tcp --dport 443 -j ACCEPT')
|
iptables.append('iptables_both -A INPUT -p tcp --dport 443 -j ACCEPT')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'iptables': {
|
'iptables': {
|
||||||
|
|
|
@ -40,8 +40,8 @@ def iptables(metadata):
|
||||||
iptables = []
|
iptables = []
|
||||||
|
|
||||||
for iface in sorted(interfaces):
|
for iface in sorted(interfaces):
|
||||||
iptables.append(f'iptables -A INPUT -i {iface} -p tcp --dport 53 -j ACCEPT')
|
iptables.append(f'iptables_both -A INPUT -i {iface} -p tcp --dport 53 -j ACCEPT')
|
||||||
iptables.append(f'iptables -A INPUT -i {iface} -p udp --dport 53 -j ACCEPT')
|
iptables.append(f'iptables_both -A INPUT -i {iface} -p udp --dport 53 -j ACCEPT')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'iptables': {
|
'iptables': {
|
||||||
|
|
Loading…
Reference in a new issue