Skip to content

Instantly share code, notes, and snippets.

@riblo
Created October 4, 2019 15:57
Show Gist options
  • Save riblo/5f4a861f24809bb5ed1323691dc56c53 to your computer and use it in GitHub Desktop.
Save riblo/5f4a861f24809bb5ed1323691dc56c53 to your computer and use it in GitHub Desktop.
Disable linux firewall: Disable firewalld and iptables rules and chains
#!/bin/bash
# stop and disable fwd 4 systemd linux host
systemctl stop firewalld
systemctl disable firewalld
# accept, flush and delete all iptables rules and chains
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment