LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-15-2024, 10:59 PM   #1
maddy0
Member
 
Registered: May 2023
Posts: 86

Rep: Reputation: 2
Iptables


Hello, what's wrong with my Iptables rues?
sudo systemctl status iptables
● netfilter-persistent.service - netfilter persistent configuration
Loaded: loaded (/lib/systemd/system/netfilter-persistent.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/netfilter-persistent.service.d
└─iptables.conf
Active: active (exited) since Fri 2024-02-16 05:39:18 CET; 17min ago
Docs: man:netfilter-persistent(8)
Main PID: 8439 (code=exited, status=0/SUCCESS)
CPU: 13ms

Feb 16 05:39:18 xxxx systemd[1]: Starting netfilter-persistent.service - netfilter persistent configuration...
Feb 16 05:39:18 xxxx netfilter-persistent[8441]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
Feb 16 05:39:18 xxx netfilter-persistent[8442]: Warning: skipping IPv4 (no rules to load)
Feb 16 05:39:18 xxxx netfilter-persistent[8441]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
Feb 16 05:39:18 xxxx netfilter-persistent[8443]: Warning: skipping IPv6 (no rules to load)
Feb 16 05:39:18 xxxx netfilter-persistent[8443]: /usr/share/netfilter-persistent/plugins.d/25-ip6tables: 39: cannot open /etc/iptables/rules.v6: No such file
Feb 16 05:39:18 xxxx netfilter-persistent[8443]: Error: IPv6 rules failed test load. New rules NOT loaded
Feb 16 05:39:18 xxxx systemd[1]: Finished netfilter-persistent.service - netfilter persistent configuration.

sudo iptables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT ACCEPT
-N port-scan
-N syn-flood
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
-A INPUT -p icmp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -p icmp -f -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j LOG --log-prefix "IPTABLES NULL-SCAN:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j LOG --log-prefix "IPTABLES XMAS-SCAN:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN -j LOG --log-prefix "IPTABLES SYNFIN-SCAN:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j LOG --log-prefix "IPTABLES NMAP-XMAS-SCAN:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN -j LOG --log-prefix "IPTABLES FIN-SCAN:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,PSH,URG -j LOG --log-prefix "IPTABLES NMAP-ID:"
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,PSH,URG -j DROP
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j LOG --log-prefix "IPTABLES SYN-RST:"
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j DROP
-A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn-flood
-A INPUT -i eth0 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j LOG --log-prefix "IPTABLES SYN-FLOOD:"
-A INPUT -i eth0 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -j port-scan
-A INPUT -p tcp -m tcp --dport 22 -j DROP
-A INPUT -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j DROP
-A OUTPUT -p udp -m udp --dport 53 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A port-scan -m limit --limit 1/sec --limit-burst 4 -j RETURN
-A port-scan -j LOG --log-prefix "IPTABLES PORT-SCAN:"
-A port-scan -j DROP
-A syn-flood -m limit --limit 1/sec --limit-burst 4 -j RETURN
-A syn-flood -j LOG --log-prefix "IPTABLES SYN-FLOOD:"
-A syn-flood -j DROP

Last edited by maddy0; 02-15-2024 at 11:07 PM.
 
Old 02-15-2024, 11:21 PM   #2
maddy0
Member
 
Registered: May 2023
Posts: 86

Original Poster
Rep: Reputation: 2
sudo systemctl status iptables
● netfilter-persistent.service - netfilter persistent configuration
Loaded: loaded (/lib/systemd/system/netfilter-persistent.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/netfilter-persistent.service.d
└─iptables.conf
Active: active (exited) since Fri 2024-02-16 06:14:27 CET; 2min 0s ago
Docs: man:netfilter-persistent(8)
Process: 1002 ExecStart=/usr/sbin/netfilter-persistent start (code=exited, status=0/SUCCESS)
Main PID: 1002 (code=exited, status=0/SUCCESS)
CPU: 18ms

Feb 16 06:14:26 xxxx systemd[1]: Starting netfilter-persistent.service - netfilter persistent configuration...
Feb 16 06:14:26 xxxx netfilter-persistent[1010]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
Feb 16 06:14:27 xxxx netfilter-persistent[1010]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
Feb 16 06:14:27 xxxx systemd[1]: Finished netfilter-persistent.service - netfilter persistent configuration.

I Would like to cancel this 3d, but can't find how to.
 
Old 02-16-2024, 06:42 AM   #3
EllisFarrell
LQ Newbie
 
Registered: Feb 2024
Posts: 1

Rep: Reputation: 0
Have you found out how to cancel? Dear reader, Uncover exclusive Coins Game casino no deposit bonus at this link thanks to CasinosAnalyzer. Dive into a world of unique promotions that bring an extra layer of thrill to your gaming sessions. Don't miss out on the excitement of exclusive bonuses waiting for you at Coins.

Last edited by EllisFarrell; 02-26-2024 at 02:28 AM.
 
Old 02-17-2024, 12:13 PM   #4
maddy0
Member
 
Registered: May 2023
Posts: 86

Original Poster
Rep: Reputation: 2
nope
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables error in android: iptables-save and iptables-restore not working preetb123 Linux - Mobile 5 04-11-2011 01:56 PM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
iptables book wich one can you pll recomment to be an iptables expert? linuxownt Linux - General 2 06-26-2003 04:38 PM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration