Quote:
Originally Posted by balonfx
Yes create a file like /etc/iptables.firewall.rules and ensure you run iptables-restore < /etc/itpables.firewall.rules from there.
Also on startup create something such as: /etc/network/if-pre-up.d/iptables
Code:
#!/bin/sh
/sbin/iptables-restore < /etc/iptables.firewall.rules
This'll ensure on system startup you will restore these rules into your system. (Or whenever networking restarts)
|
Thanks for the help! I created a file with nano /etc/iptables.firewall.rules
And just type this inside the file and than
Code:
-A INPUT -p udp -m udp --dport 27015 -m state --state NEW -m recent --set --name DEFAULT --rsource
-A INPUT -p udp -m udp --dport 27015 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 --name DEFAULT --rsource -j DROP
Code:
= #!/bin/sh
/sbin/iptables-restore < /etc/iptables.firewall.rules
Btw, i can't find iptables in /etc/network/if-pre-up.d/iptables or anywhere but i know its installed so i might need to look for it.
And yes, i'm new to Linux but i'm learning