From: "Robert Vale" <bob@mirai.net>
To: lartc@vger.kernel.org
Subject: [LARTC] IMQ and NAT
Date: Fri, 11 Oct 2002 11:32:57 +0000 [thread overview]
Message-ID: <marc-lartc-103433601516926@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
I'm trying to get IMQ working correctly as incoming on a box that is running SNAT.
I've modified imq.c so that it fires after IP_PRI_NAT_DST instead of mangle and am using tc filter commands to choose the flowid based on the destination address. IMQ still seems to be firing before the system has reversed the SNAT.
scripts I'm using
tc qdisc add dev imq0 root handle 1: htb default 20
DOWNLINK=512
LIMIT="ceil ${DOWNLINK}kbit"
tc class add dev imq0 parent 1: classid 1:1 htb rate ${DOWNLINK}kbit
tc class add dev imq0 parent 1:1 classid 1:10 htb rate 64kbit $LIMIT
tc class add dev imq0 parent 1:1 classid 1:20 htb rate 64kbit $LIMIT
tc qdisc add dev imq0 parent 1:10 handle 10: sfq
tc qdisc add dev imq0 parent 1:20 handle 20: sfq
tc filter add dev imq0 parent 1: protocol ip prio 1 u32 match ip dst 172.30.0.2/32 flowid 1:10
iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0
iptables -t nat -A PREROUTING -s 172.30.0.0/24 -d ! 172.30.0.0/24 -j MASQUERADE
ip link set imq0 up
[-- Attachment #2: Type: text/html, Size: 2784 bytes --]
reply other threads:[~2002-10-11 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-103433601516926@msgid-missing \
--to=bob@mirai.net \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.