From: "XMundo - Soporte Tecnico" <soporte@xmundo.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Doesn´t work
Date: Sat, 18 Sep 2004 21:31:41 +0000 [thread overview]
Message-ID: <01bd01c49dc6$e48edd70$fd01000a@estacion1> (raw)
I have the next script written by me but it doen´t work correctly. The
modem2 (eth2) send the
packets with the source IP of the modem1 (eth0).
I´m view it with the snort (snort -i eth2 -Nv port 80).....
Any idea?
It is my script::
##################################
IP=/sbin/ip
IPTABLES=/sbin/iptables
MODEM1="eth0"
MODEM2="eth2"
LAN="eth1"
$IPTABLES -A FORWARD -i $LAN -o $MODEM1 -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o $MODEM1 -j MASQUERADE
$IPTABLES -A FORWARD -i $LAN -o $MODEM2 -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o $MODEM2 -j MASQUERADE
$IP rule add fwmark 1 table modem1
$IP rule add fwmark 2 table modem2
$IP rule add fwmark 3 table web
$IP route add table web eql nexthop via 24.xxx.xxx.1 dev $MODEM1 nexthop via
200.xxx.xxx.1 dev $MODEM2
$IP route add default via 24.xxx.xxx.1 dev $MODEM1 table modem1
$IP route add default via 200.xxx.xxx.1 dev $MODEM2 table modem2
$IPTABLES -A PREROUTING -t mangle -i $LAN -p tcp --dport 80 -j
MARK --set-mark 3
echo "0" > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo "0" > /proc/sys/net/ipv4/conf/eth2/rp_filter
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-09-18 21:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-18 21:31 XMundo - Soporte Tecnico [this message]
2004-09-18 22:18 ` [LARTC] Doesn´t work Brent Clark
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='01bd01c49dc6$e48edd70$fd01000a@estacion1' \
--to=soporte@xmundo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox