From: George Georgalis <georgw@galis.org>
To: netfilter@lists.samba.org
Subject: ssh connecting to wrong machine....
Date: Sun, 2 Jun 2002 19:21:57 -0400 [thread overview]
Message-ID: <20020602192157.A16556@trot.haven.dom> (raw)
On a 2 interface firewall, I've set up an alias eth1:1 ($EXT_host04) to
an IP on our T-1, then added a nat which should connect ports $TCP_OPEN
and $UDP_OPEN to the internal IP ($LAN_host04).
But when I go to ssh $EXT_host04 from the internet I end up talking to
the firewall sshd, not the sshd on $LAN_host04. Why is that? Here are my
rules:
LANIF=eth0
EXTIF=eth1
TCP_OPEN="22,25,53,80"
UDP_OPEN="22,53"
iptables -A INPUT -m state --state ESTABLISHED,RELATED \
-j ACCEPT
iptables -A INPUT -i $EXTIF -m state --state NEW \
-p tcp -m multiport --dport $TCP_OPEN -j ACCEPT
iptables -A INPUT -i $EXTIF -m state --state NEW \
-p udp -m multiport --dport $UDP_OPEN -j ACCEPT
iptables -A FORWARD -i $EXTIF -o $LANIF -p tcp \
-m multiport --dport $TCP_OPEN \
-m state --state NEW,RELATED,ESTABLISHED \
-j ACCEPT
iptables -A FORWARD -i $EXTIF -o $LANIF -p udp \
-m multiport --dport $UDP_OPEN \
-m state --state NEW,RELATED,ESTABLISHED \
-j ACCEPT
iptables -t nat -A PREROUTING -p tcp \
-s $EXT_host04 \
-j DNAT --to-destination $LAN_host04
iptables -t nat -A POSTROUTING -o $EXTIF \
-j MASQUERADE
Thanks,
// George
--
GEORGE GEORGALIS, System Admin/Architect cell: 347-451-8229
Security Services, Web, Mail, mailto:george@galis.org
File, Print, DB and DNS Servers. http://www.galis.org/george
next reply other threads:[~2002-06-02 23:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-02 23:21 George Georgalis [this message]
2002-06-03 2:58 ` ssh connecting to wrong machine Matthew Hellman
2002-06-03 5:05 ` George Georgalis
2002-06-03 12:13 ` Matthew Hellman
2002-06-03 20:57 ` George Georgalis
2002-06-03 3:04 ` George Georgalis
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=20020602192157.A16556@trot.haven.dom \
--to=georgw@galis.org \
--cc=netfilter@lists.samba.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