Skip to content

Commit

Permalink
fixes iptables-restore error
Browse files Browse the repository at this point in the history
  • Loading branch information
BugRoger committed Dec 13, 2017
1 parent 207b043 commit f5b1dea
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions pkg/templates/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,16 @@ storage:
- path: /var/lib/iptables/rules-save
filesystem: root
mode: 0644
contents:
inline: |-
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -p tcp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE --to-ports 32000-65000
-A POSTROUTING -p udp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE --to-ports 32000-65000
-A POSTROUTING -p icmp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE
COMMIT
contents: |
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -p tcp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE --to-ports 32000-65000
-A POSTROUTING -p udp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE --to-ports 32000-65000
-A POSTROUTING -p icmp ! -d {{ .ClusterCIDR }} -m addrtype ! --dst-type LOCAL -j MASQUERADE
COMMIT
- path: /etc/sysctl.d/10-enable-icmp-redirects
filesystem: root
mode: 0644
Expand Down

0 comments on commit f5b1dea

Please sign in to comment.