Mangle table rules are not taken into account
Quoted 14 lines · Pascal Hambourg
Quoted 4 lines · Konstantin Ushakov
Quoted 1 line
What about the REJECT target ?
Correct me if I'm mistaken, but REJECT target is only valid in filter table.
Correct.
Quoted 2 lines
But the packet does not reach filter table because of reasons described by Patric (as we DROP it after mangle).
Im meant to use the REJECT target /instead of/ an "unreachable" routing rule.
Quoted 6 lines
Remove
ip rule add from all fwmark0xblookup 99 unreachable prio 40000And add
iptables -t filter -A OUTPUT -m mark --mark 0xb \ -j REJECT --rejected-with icmp-net-unreachable
Or make it really simple, and use REJECT in mangle with something like this:
ipt_REJECT.c 2007-10-12 08:31:44.000000000 +0300 renamed from ipt_REJECT.bak.c 2007-10-12 08:25:17.000000000 +0300 +1 -3
@@ -165,6 +165,7 @@ static void send_reset(struct sk_buff *o static inline void send_unreach(struct sk_buff *skb_in, int code) { + if (!skb_in->dst) ip_route_me_harder(&skb_in, RTN_UNSPEC); icmp_send(skb_in, ICMP_DEST_UNREACH, code, 0); }
@@ -245,9 +246,6 @@ static struct xt_target ipt_reject_reg = .family = AF_INET, .target = reject, .targetsize = sizeof(struct ipt_reject_info), - .table = "filter", - .hooks = (1 << NF_IP_LOCAL_IN) | (1 << NF_IP_FORWARD) | - (1 << NF_IP_LOCAL_OUT), .checkentry = check, .me = THIS_MODULE, };
Thanks!
--
Al
-
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html