The Media Server wrote, On 01/15/2015 11:34 PM:
Hi I can't get my PREROUTING iptables rule to mark my packets via --set-mark on Ubuntu iptables -t mangle -A PREROUTING -p tcp --sport 80 -j MARK --set-mark 2 rule add fwmark 2 table 2 iptables -t mangle -A PREROUTING -j MARK --set-mark 2 iptables -t mangle -A INPUT -j MARK --set-mark 2 iptables -t nat -A INPUT -j MARK --set-mark 2 iptables -t nat -A PREROUTING -j MARK --set-mark 2 None of the above pass trough the table2 but this does pass trough the table 2 with this rule: ip rule add from 192.168.2.0/24 table 2 ---- Is there a problem marking packets in Ubuntu 14.04.1 LTS and iptables v1.4.21?
Have you also defined table 2 in /etc/iproute2/rt_tables ? It must be something like: 2 mytab2 I think there is no tool for it, you have to edit the file. later you can use ip rule ls ip route ls ip route ls table 2 or alternatively ip route ls table mytab2 and don't forget to del the wrong or excess entries there... ip rule del fwmark 2 table 2 ip route flush table 2 -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html