Skip to content

Instantly share code, notes, and snippets.

@janeczku
Created January 11, 2021 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janeczku/6e989b7852ee694cd4a15f22616e34c2 to your computer and use it in GitHub Desktop.
Save janeczku/6e989b7852ee694cd4a15f22616e34c2 to your computer and use it in GitHub Desktop.
Fix RHEL8 firewall configuration for Rancher agent
sudo iptables -P FORWARD ACCEPT
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/50-docker-forward.conf
for mod in ip_tables ip_vs_sh ip_vs ip_vs_rr ip_vs_wrr; do sudo modprobe $mod; echo $mod | sudo tee -a /etc/modules-load.d/iptables.conf; done
sudo dnf -y install network-scripts
sudo systemctl enable network
sudo systemctl disable NetworkManager
@lynsei
Copy link

lynsei commented Jan 12, 2021

Part of it is written to use the Rancher CLI, since my cloud is already running Rancher on EC2 with Fargate clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment