
iptables
List of commands for iptables:
-
iptables:ai:14f21 $IPTABLES -A FORWARD -i $LAN_IFACE -j ACCEPT $IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT$ iptables -A FORWARD -i $LAN_IFACE -j ACCEPT && iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPTtry on your machineexplain this command
-
iptables:ai:1df9a /usr/sbin/iptables -A INPUT -s 127.0.0.0/8 -p tcp --dport 111 -j DROP$ /usr/sbin/iptables -A INPUT -s 127.0.0.0/8 -p tcp --dport 111 -j DROPtry on your machineexplain this command
-
iptables:ai:4c5e7 Allow incoming TCP and UDP traffic on port 22 (SSH) for interface eth0$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT && /sbin/iptables -A INPUT -p udp -i eth0 --dport 22 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:5090c How to limit traffic to zoom$ iptables -A OUTPUT -p udp --dport 3478:3479 -j DROPtry on your machineexplain this command
-
iptables:ai:73c79 /sbin/iptables -A INPUT -p tcp -i eth0 --dport 113 -j REJECT --reject-with tcp-reset$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 113 -j REJECT --reject-with tcp-resettry on your machineexplain this command
-
iptables:ai:8dddf Allow all outgoing traffic from localhost, LAN IP, and Internet IP addresses$ iptables -A OUTPUT -p ALL -s $LO_IP -j ACCEPT && iptables -A OUTPUT -p ALL -s $LAN_IP -j ACCEPT && iptables -A OUTPUT -p ALL -s $INET_IP -j ACCEPTtry on your machineexplain this command
-
iptables:ai:9163b /sbin/iptables -P INPUT DROP /sbin/iptables -P OUTPUT DROP /sbin/iptables -P FORWARD DROP$ /sbin/iptables -P INPUT DROP && /sbin/iptables -P OUTPUT DROP && /sbin/iptables -P FORWARD DROPtry on your machineexplain this command
-
iptables:ai:b2d31 Allow all traffic on the loopback interface$ /sbin/iptables -A INPUT -i lo -j ACCEPT /sbin/iptables -A OUTPUT -o lo -j ACCEPTtry on your machineexplain this command
-
iptables:ai:b35a1 $IPTABLES -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j ACCEPT $IPTABLES -A icmp_packets -p ICMP -s 0/0 --icmp-type 11 -j ACCEPT$ iptables -A icmp_packets -p ICMP -s 0/0 --icmp-type 8 -j ACCEPT && iptables -A icmp_packets -p ICMP -s 0/0 --icmp-type 11 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:b7864 Allow incoming TCP and UDP traffic on port 443 via eth0 interface$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 443 -j ACCEPT /sbin/iptables -A INPUT -p udp -i eth0 --dport 443 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:b93ed Add a rule to allow incoming TCP traffic on port 4 for interface eth0$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 4 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:bae6f Block incoming traffic from private, reserved, and multicast IP address ranges$ /sbin/iptables -A INPUT -i eth0 -s 0.0.0.0/8 -j DROP ... /sbin/iptables -A INPUT -i eth0 -s 240.0.0.0/8 -j DROPtry on your machineexplain this command
-
iptables:ai:be3cb Allow incoming traffic from specified IP ranges on LAN and loopback interfaces$ iptables -A INPUT -p ALL -i $LAN_IFACE -s $LAN_IP_RANGE -j ACCEPT && iptables -A INPUT -p ALL -i $LO_IFACE -s $LO_IP -j ACCEPT && iptables -A INPUT -p ALL -i $LO_IFACE -s $LAN_IP -j ACCEPT && iptables -A INPUT -p ALL -i $LO_IFACE -s $INET_IP -j ACCEPTtry on your machineexplain this command
-
iptables:ai:bf6de Allow incoming TCP and UDP traffic on port 80 on interface eth0$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT /sbin/iptables -A INPUT -p udp -i eth0 --dport 80 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:ec876 /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type destination-unreachable -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type time-exceeded -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -j ACCEPT$ /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type destination-unreachable -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type time-exceeded -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT /sbin/iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -j ACCEPTtry on your machineexplain this command
-
iptables:ai:fa31b Allow incoming TCP and UDP traffic on port 21 (FTP) on interface eth0$ /sbin/iptables -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT /sbin/iptables -A INPUT -p udp -i eth0 --dport 21 -j ACCEPTtry on your machineexplain this command
-
iptables:ai:fb39e /usr/sbin/iptables -A INPUT -i eth1 -p all -s 160.86.0.0/16 -j ACCEPT /usr/sbin/iptables -A INPUT -i eth1 -p all -j DROP$ /usr/sbin/iptables -A INPUT -i eth1 -p all -s 160.86.0.0/16 -j ACCEPT ; /usr/sbin/iptables -A INPUT -i eth1 -p all -j DROPtry on your machineexplain this command
-
iptables:tldr:4adb5 iptables: Save iptables configuration of a given table to a file.$ sudo iptables-save -t ${tablename} > ${path-to-iptables_file}try on your machineexplain this command
-
iptables:tldr:5588b iptables: Restore iptables configuration from a file.$ sudo iptables-restore < ${path-to-iptables_file}try on your machineexplain this command
-
iptables:tldr:b1732 iptables: Append rule to chain policy for IP.$ sudo iptables -A ${chain} -s ${ip} -j ${rule}try on your machineexplain this command
-
iptables:tldr:d00ca iptables: Append rule to chain policy for IP considering protocol and port.$ sudo iptables -A ${chain} -s ${ip} -p ${protocol} --dport ${port} -j ${rule}try on your machineexplain this command
-
iptables:tldr:d9875 iptables: Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP.$ sudo iptables -t ${nat} -A ${POSTROUTING} -s ${192-168-0-0-24} -j ${MASQUERADE}try on your machineexplain this command
-
iptables:tldr:e74eb iptables: Delete chain rule.$ sudo iptables -D ${chain} ${rule_line_number}try on your machineexplain this command
-
iptables:tldr:f71f6 iptables: Set chain policy rule.$ sudo iptables -P ${chain} ${rule}try on your machineexplain this command