
Udp Pathv3 Ip Tables Made By RebornXV ----------------------------------------- Make sure to add some of the tables i alr added some of the first ones you add the wrong ones it will dc you from you ssh so read an look at them carefuly dont share my tables or i will not be selling them or giving them to you no more idc who it is ------------------------------------------------------------------------ iptables -A INPUT -p udp -m limit --limit 100/s --limit-burst 200 -j ACCEPT - iptables -A INPUT -p udp -m limit --limit 1000/s --limit-burst 1500 -j ACCEPT - iptables -A INPUT -p udp -m state --state INVALID -j DROP - iptables -A INPUT -p udp --dport 53 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - iptables -A INPUT -p udp -s 1.0.0.0/8 -j DROP - iptables -A INPUT -p udp -s 10.0.0.0/8 -j DROP iptables -A INPUT -p udp -s 172.16.0.0/12 -j DROP iptables -A INPUT -p udp -s 192.168.0.0/16 -j DROP - iptables -A INPUT -p udp --dport 123 -j DROP - iptables -A INPUT -p udp --dport 67 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - #!/bin/bash - # Flush existing rules iptables -F iptables -X - # Default policies: Drop all incoming traffic, allow outgoing traffic iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT - # Allow loopback interface (localhost) iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT - # Allow established connections iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT - # Rate-limit incoming UDP packets (100 per second per IP) iptables -A INPUT -p udp -m limit --limit 100/s --limit-burst 200 -j ACCEPT - # Drop invalid UDP packets iptables -A INPUT -p udp -m state --state INVALID -j DROP - # Limit UDP traffic on DNS port (53) to 10 packets per second iptables -A INPUT -p udp --dport 53 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - # Block private IP ranges for incoming UDP packets iptables -A INPUT -p udp -s 10.0.0.0/8 -j DROP iptables -A INPUT -p udp -s 172.16.0.0/12 -j DROP iptables -A INPUT -p udp -s 192.168.0.0/16 -j DROP - # Drop UDP traffic on ports that aren't required (e.g., NTP on port 123) iptables -A INPUT -p udp --dport 123 -j DROP - # Drop all incoming UDP traffic from a specific country (replace with actual range) iptables -A INPUT -p udp -s 1.0.0.0/8 -j DROP # Example IP range - # Drop UDP broadcast traffic on unused ports (if not needed) iptables -A INPUT -p udp --dport 67 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - # Log dropped packets for debugging purposes iptables -A INPUT -p udp -j LOG --log-prefix "UDP DROP: " - # Save iptables rules (Debian/Ubuntu example) iptables-save > /etc/iptables/rules.v4 - # Flush all existing rules and delete user-defined chains iptables -F iptables -X - # Default policies: Drop all incoming traffic, allow outgoing traffic iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT - # Allow loopback traffic (localhost) iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT - # Allow UDP packets, limit rate to 100 packets per second (with a burst of 200) iptables -A INPUT -p udp -m limit --limit 100/s --limit-burst 200 -j ACCEPT - # Drop invalid UDP packets iptables -A INPUT -p udp -m state --state INVALID -j DROP - # Block UDP traffic on specific ports (e.g., DNS port 53, NTP port 123) iptables -A INPUT -p udp --dport 53 -j DROP # Block DNS traffic iptables -A INPUT -p udp --dport 123 -j DROP # Block NTP traffic - # Block UDP packets from private IP ranges (spoofed traffic) iptables -A INPUT -p udp -s 10.0.0.0/8 -j DROP iptables -A INPUT -p udp -s 172.16.0.0/12 -j DROP iptables -A INPUT -p udp -s 192.168.0.0/16 -j DROP - # Rate-limit UDP traffic for DNS (port 53) to 10 packets per second iptables -A INPUT -p udp --dport 53 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - # Rate-limit UDP traffic for NTP (port 123) to 5 packets per second iptables -A INPUT -p udp --dport 123 -m limit --limit 5/s --limit-burst 10 -j ACCEPT - # Log all dropped UDP packets for debugging (be cautious with this during high traffic) iptables -A INPUT -p udp -j LOG --log-prefix "UDP DROP: " --log-level 4 - # Save iptables rules to a file (Debian/Ubuntu) iptables-save > /etc/iptables/rules.v4 - # Save iptables rules on CentOS/RHEL systems service iptables save - #!/bin/bash - # Flush existing rules iptables -F iptables -X - # Default policies: Drop all incoming traffic, allow outgoing traffic iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT - # Allow loopback interface (localhost) iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT - # Allow established connections iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT - # Rate-limit UDP traffic (100 packets per second) iptables -A INPUT -p udp -m limit --limit 100/s --limit-burst 200 -j ACCEPT - # Drop invalid UDP packets iptables -A INPUT -p udp -m state --state INVALID -j DROP - # Block UDP traffic on DNS (port 53) and NTP (port 123) iptables -A INPUT -p udp --dport 53 -j DROP # Block DNS iptables -A INPUT -p udp --dport 123 -j DROP # Block NTP - # Block UDP packets from private IP ranges iptables -A INPUT -p udp -s 10.0.0.0/8 -j DROP iptables -A INPUT -p udp -s 172.16.0.0/12 -j DROP iptables -A INPUT -p udp -s 192.168.0.0/16 -j DROP - # Rate-limit UDP traffic for DNS (port 53) to 10 packets per second iptables -A INPUT -p udp --dport 53 -m limit --limit 10/s --limit-burst 20 -j ACCEPT - # Rate-limit UDP traffic for NTP (port 123) to 5 packets per second iptables -A INPUT -p udp --dport 123 -m limit --limit 5/s --limit-burst 10 -j ACCEPT - # Log dropped UDP packets for debugging iptables -A INPUT -p udp -j LOG --log-prefix "UDP DROP: " --log-level 4 - # Save iptables rules (Debian/Ubuntu example) iptables-save > /etc/iptables/rules.v4 - enjoy the update v3 path udp patch - this works with royale hosting vpses ill make more that work for royale hosting
Comments