Viewing all iptables rules - Unix & Linux Stack Exchange

iptables -t mangle -A PREROUTING -p TCP --dport 22 -j TOS --set-tos 0x10: Explanation: The --set-tos option tells the TOS mangler what TOS value to set on packets that are matched. The option takes a numeric value, either in hex or in decimal value. As the TOS value consists of 8 bits, the value may be 0-255, or in hex 0x00-0xFF. Note that in Meanings of IPTABLES mangle table - LinuxQuestions.org Feb 14, 2011 Iptables Tutorial: Ultimate Guide to Linux Firewall Jan 28, 2020

An IPTABLES Primer | Daniel Miessler

Linux Howtos: Security -> iptables-tutorial iptables -t mangle -A INPUT -m mark --mark 1: Explanation: This match is used to match packets that have previously been marked. Marks can be set with the MARK target which we will discuss in the next section. All packets traveling through Netfilter get a special mark field associated with them. An IPTABLES Primer | Daniel Miessler Feb 27, 2020

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT do not forget in addition to masquerading to authorize forwarding from your LAN. Say 192.168.0.0/24 is the LAN of your host and 192.168.1.0/24 the LAN you want to connect to the Web, then : iptables -I FORWARD 1 -s 192.168.1.0/24 ! -d 192.168.0.0/24 -j ACCEPT

iptables - remove packet mark on certain packets - Stack iptables -t mangle -A PREROUTING -p tcp --dport 443 -j MARK --set-mark 2 I am redirecting it to my proxy server later on, which is working. For one host, however, I need to remove the iptables mark (i.e. the packets will not be redirected.) I tried the following: iptables -t mangle -A PREROUTING -p tcp -s 192.168.0.47 --dport 443 -j ACCEPT