From: BERTRAND Joel <joel.bertrand@systella.fr>
To: netfilter@vger.kernel.org
Subject: [sparc specific bug ?] Iptables, iproute2 and mark
Date: Mon, 21 Mar 2011 23:30:03 +0100 [thread overview]
Message-ID: <4D87D16B.8050005@systella.fr> (raw)
Hello,
I have upgraded a sparc box from 2.6.30.9 to 2.6.38 linux kernel
(sun4v) and iptables 1.4.10. This box has four ethernet interfaces and I
have written a script to route packets with iptables and iproute2:
eth0 : WAN (default)
eth1 : DMZ
eth2 : LAN
eth3 : WAN2
Default gateway for LAN is eth0. For DMZ, default gateway is eth3. My
script contains:
IPTABLES=/sbin/iptables
ROUTE=/sbin/route
IPROUTE2=/bin/ip
...
$ROUTE add default gw 213.215.42.65 dev eth0
$IPROUTE2 rule add from 213.215.42.69 lookup local_traffic priority 100
$IPROUTE2 rule add fwmark 1 table local_traffic priority 101
$IPROUTE2 route add default via 213.215.42.65 dev eth3 table\
local_traffic
$IPROUTE2 route flush cache
$IPTABLES -t mangle -A PREROUTING -s 192.168.0.0/24 -j MARK --set-mark 1
$IPTABLES -t nat -A POSTROUTING -o eth3 -m mark --mark 1 -j SNAT \
--to-source 213.215.42.69
echo 0 > /proc/sys/net/ipv4/conf/eth3/rp_filter
echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_ignore
echo 1 > /proc/sys/net/ipv4/conf/eth3/arp_ignore
echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_filter
echo 1 > /proc/sys/net/ipv4/conf/eth3/arp_filter
I can post all my script but it is long and without any interest. With
2.6.30.9 kernel, my script works fine. With 2.6.38, it doesn't. Packets
from DMZ are not routed by eth3. Any idea ?
Regards,
JB
next reply other threads:[~2011-03-21 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 22:30 BERTRAND Joel [this message]
2011-03-22 10:19 ` [sparc specific bug ?] Iptables, iproute2 and mark bertrand
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=4D87D16B.8050005@systella.fr \
--to=joel.bertrand@systella.fr \
--cc=netfilter@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.