Created
February 10, 2019 05:27
-
-
Save planetbeing/7c8f919a4dfbacf7681145a402884dbd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[Unit] | |
Description=Create cbr0 and add rules to allow microk8s containers to have networking. | |
[Service] | |
ExecStart=/sbin/ip link add name cbr0 type bridge | |
ExecStart=/sbin/iptables -A FORWARD -i cbr0 -j ACCEPT | |
ExecStart=/sbin/iptables -A FORWARD -o cbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
ExecStart=/sbin/iptables -P FORWARD DROP | |
TimeoutStopSec=30 | |
Type=oneshot | |
[Install] | |
WantedBy=multi-user.target | |
RequiredBy=snap.microk8s.daemon-docker.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment