Created
March 24, 2022 07:17
-
-
Save ashishakya/77712d81753f78db0e4ac34253cc6c38 to your computer and use it in GitHub Desktop.
ip tables rules for oracle server
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
| 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