-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INF-176: Load iptables rules through a file.
- Loading branch information
Pablo
committed
Mar 26, 2020
1 parent
52b9683
commit 33e04a9
Showing
2 changed files
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Generated by iptables-save v1.6.1 on Tue Mar 24 10:02:12 2020 | ||
*nat | ||
:PREROUTING ACCEPT [4:160] | ||
:INPUT ACCEPT [4:160] | ||
:OUTPUT ACCEPT [1:76] | ||
:POSTROUTING ACCEPT [1:76] | ||
{% for network in vpn_gateway_configs[0].local.networks %} | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
{% endfor %} | ||
{% for network in vpn_gateway_configs[0].remote.networks %} | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
{% endfor %} | ||
COMMIT | ||
# Completed on Tue Mar 24 10:02:12 2020 | ||
# Generated by iptables-save v1.6.1 on Tue Mar 24 10:02:12 2020 | ||
*filter | ||
:INPUT ACCEPT [106:6884] | ||
:FORWARD ACCEPT [0:0] | ||
:OUTPUT ACCEPT [83:14956] | ||
{% for network in vpn_gateway_configs[0].local.networks %} | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
{% endfor %} | ||
{% for network in vpn_gateway_configs[0].remote.networks %} | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
-A FORWARD -s "{{ network }}" -j ACCEPT | ||
{% endfor %} | ||
-A FORWARD -j REJECT --reject-with icmp-port-unreachable | ||
COMMIT | ||
# Completed on Tue Mar 24 10:02:12 2020 |