Skip to content

Instantly share code, notes, and snippets.

@ashishakya
Created March 24, 2022 07:17
Show Gist options
  • Select an option

  • Save ashishakya/77712d81753f78db0e4ac34253cc6c38 to your computer and use it in GitHub Desktop.

Select an option

Save ashishakya/77712d81753f78db0e4ac34253cc6c38 to your computer and use it in GitHub Desktop.
ip tables rules for oracle server
sudo iptables-save > ~/iptables-rules
## modify rules, remove drop and reject lines
grep -v "DROP" iptables-rules > tmpfile && mv tmpfile iptables-rules-mod
grep -v "REJECT" iptables-rules-mod > tmpfile && mv tmpfile iptables-rules-mod
## apply the modifications
sudo iptables-restore < ~/iptables-rules-mod
## check
sudo iptables -L
## save the changes
sudo netfilter-persistent save
sudo systemctl restart iptables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment