Learn to cross happiness and sorrow on the long river of ups and downs life.
0%
IPTABLES
Posted onEdited onInlinux
,
services
,
firewallSymbols count in article: 5.5kReading time ≈5 mins.
IPv6
Type 0 Routing Header
IPv6 type 0 routing header processing should be disabled by default.
1 2 3
iptables --insert INPUT 0 --match rt --rt-type 0 --jump DROP iptables --insert OUTPUT 0 --match rt --rt-type 0 --jump DROP iptables --insert FORWARD 0 --match rt --rt-type 0 --jump DROP
Hop Limit
This field sets the lifetime of the packet. Every time a router forwards a packet, it decrements the value of this field by 1. If the value reaches zero, the packet is discarded. The size of this field is 8 bits.
Multicast ping replies are part of the ok icmp codes for INPUT, but don’t have an associated connection and are otherwise be marked INVALID, so allow above INVALID rules.
QoS, There are five valid TOS values, which can be used with either numeric or descriptive values
Minimize-Delay 16 (0x10)
Maximize-Throughput 8 (0x08)
Maximize-Reliability 4 (0x04)
Minimize-Cost 2 (0x02)
Normal-Service 0 (0x00) Notice that we’re using the names of the service instead of a simple port number. This can be done with most common ports. Check /etc/services for a full list.
This module attempts to match various characteristics of the packet creator, for locally generated packets. This match is only valid in the OUTPUT and POSTROUTING chains. Forwarded packets do not have any socket associ‐ated with them. Packets from kernel threads do have a socket, but usually no owner.
Matches if the packet socket’s file structure (if it has one) is owned by the given user. You may also specify a numerical UID, or an UID range.
--uid-owner username
--uid-owner userid[-userid]
Matches if the packet socket’s file structure is owned by the given group. You may also specify a nu‐merical GID, or a GID range.