REDIRECT
Hi all,
Quoted 5 lines
Quoted 2 lines
How to i make by libipq this rule:
-j REDIRECT --to-ports 3128 ?You don't.
REDIRECT or other NAT related operations must be done in the kernel.
Ok, but if i use this:
-A PREROUTING -p tcp -j QUEUE
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
And in the program:
ipq_set_verdict(h, m->packet_id,NF_ACCEPT, 0, NULL);
the packet not going to second rule(REDIRECT)
Sorry to my english
Best regards, Meg
Hi, r00t.
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
How to i make by libipq this rule:
-j REDIRECT --to-ports 3128 ?You don't.
REDIRECT or other NAT related operations must be done in the kernel.Ok, but if i use this:
(quoted diff) +0
-2-A PREROUTING -p tcp -j QUEUE -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
Quoted 5 lines
And in the program:
ipq_set_verdict(h, m->packet_id,NF_ACCEPT, 0, NULL);the packet not going to second rule(REDIRECT)
-A FORWARD -p tcp -j QUEUE
or
-t nat -p tcp -j QUEUE
this right by iptables, but not work
Signature · 2 lines
Best regards, Meg mailto:[email protected]
Review
Quoted 4 lines · On Mon, 13 Dec 2004, r00t wrote:
Ok, but if i use this:
(quoted diff) +0
-2-A PREROUTING -p tcp -j QUEUE -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
You can't. QUEUE terminates the PREROUTING hook.
You need to queue before nat PREROUTING if you want to apply NAT rules on packets after QUEUE reinjects them to the kernel, i.e. from mangle or raw tables.
Regards
Henrik