# iptables -A PREROUTING -i eth0 -t mangle -p tcp --dport 25 \ -j MARK --set-mark 1 Let's say that we have multiple connections, one that is fast (and expensive, per megabyte) and one that is slower, but flat fee. We would most certainly like outgoing mail to go via the cheap route.

iptables -t mangle -I PREROUTING -i `get_wanface` -j TTL --ttl-set 10 Example 2: Set the outgoing TTL to 128, just as if a Windows machine was connected directly to the modem. iptables -t mangle -I POSTROUTING -o `get_wanface` -j TTL --ttl-set 128 Example 3: Try to hide the fact that an outgoing packet was routed, by incrementing the TTL by one. Linux NetFilter, IP Tables and Conntrack Diagrams · GitHub Jul 06, 2020 How to edit iptables rules - Fedora Project Wiki Dec 24, 2017 Linux Packet Filtering and iptables - TTL target

iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1452 This sort of thing is messy and ideally should be avoided, but I had no other options and this did solve the problem. Hope these examples help, as well as the man page.

iptables - Wikipedia There are three tables: nat, filter, and mangle. Unless preceded by the option -t, an iptables command concerns the filter table by default. For example, the command iptables -L -v -n, which shows some chains and their rules, is equivalent to iptables -t filter -L -v -n. To show chains of table nat, use the command iptables -t nat -L -v -n The Netfilter Mangle Table | The Netfilter Mangle Table iptables -t mangle -A PREROUTING -p tcp --dport 25 -j TOS --set-tos 0x04 iptables -t mangle -A PREROUTING -p tcp --sport 25 -j TOS --set-tos 0x04. Now, I know you don't want to put in 18 rules when 8 will suffice. So, let's take a look at how multiple ports can be specified in one line.

Meanings of IPTABLES mangle table - LinuxQuestions.org

Jan 24, 2011 Basic iptables tutorial with examples in Linux I - GoLinuxHub Jun 03, 2020