From: "Gludovátz Gábor" <ggabor@sopron.hu>
To: lartc@vger.kernel.org
Subject: [LARTC] Buggy netfilter?
Date: Wed, 31 Mar 2004 20:53:21 +0000 [thread overview]
Message-ID: <406B2FC1.7080209@sopron.hu> (raw)
Or am I doing something really wrong.
2 public interfaces (eth0 and ppp0), with 2 public IP addresses.
I can ping and connect to both interface's IP address. I can login with
ssh, anything on _both_ IP address.
But iptables DNAT works only for eth0.
Here are my settings:
(ppp is initialized with 'pptp provider.ip')
--- /etc/ppp/options ---
nodefaultroute
noipdefault
name "adsluser@provider"
linkname "adsl"
noauth
debug
mtu 1400
mru 1400
--- ip route settings ---
Just like in the Adv-Routing-HowTo (4.2.1. Split access), except for the
different IP addresses.
--- iptables ---
iptables -t nat -N ROUTING1
iptables -t nat -N ROUTING2
iptables -t nat -A PREROUTING -p tcp -i eth0 -j ROUTING1
iptables -t nat -A PREROUTING -p tcp -i ppp0 -j ROUTING1
iptables -t nat -A ROUTING1 -p tcp -j ROUTING2 -s $clientip1/32
iptables -t nat -A ROUTING1 -p tcp -j ROUTING2 -s $clientip2/32
iptables -t nat -A ROUTING2 -p tcp -j LOG --dport 3389 --log-prefix
"FW: MSTSC connection attempt " --log-level warn
iptables -t nat -A ROUTING2 -p tcp -j DNAT --dport 3389 --to-destination
192.168.100.23:3389
---
eth2 is the 3rd interface, with access to our 192.168.100.* private network.
-- The result: --
I can reach both interfaces (from the Internet), I can connect through
them to the firewall.
But DNAT works only with the eth0 interface.
Strange: iptables LOG rule is fired for ppp0 and eth0 connections,
but eth0 connections are successful, and at the same time:
ppp0 connections are just waiting without anything coming back.
But as you can see, the packets for both go the same way in iptables.
--- tcpdump ---
If I go through ppp0, nothing can be seen on the inner interface (eth2).
The packets seem to get lost somewhere, so nothing (nothing at all) goes
back to the client, who tries to connect.
Thanks in advance
--
Gábor Gludovátz <gabor@gludovatz.com> / +36 (70) 520 31 62
http://www.gludovatz.com/ ... ... .. .. . .
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-03-31 20:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-31 20:53 Gludovátz Gábor [this message]
2004-03-31 22:53 ` [LARTC] Buggy netfilter? Roy
2004-04-01 6:33 ` Gludovátz Gábor
2004-04-01 21:09 ` Roy
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=406B2FC1.7080209@sopron.hu \
--to=ggabor@sopron.hu \
--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.