From: "Zander" <zander@subatomic.org.uk>
To: "Simpson, Doug" <dsimpson@friedmancorp.com>,
netfilter@lists.netfilter.org
Subject: Re: ssh
Date: Wed, 15 Jan 2003 12:09:55 -0000 [thread overview]
Message-ID: <012101c2bc8f$04264f80$96ae6f83@classics.cam.ac.uk> (raw)
In-Reply-To: 20ED00AA0BC135449469D6EF0AE79C971046@ozlan.fcdomain.net
> whoops - forgot this is a dual homed computer and I am opening the eth0 to
> the outside world for ssh.
> I did find this -
> iptables -A INPUT -p tcp --syn --destination-port 22 -j ACCEPT
> iptables -A INPUT -p tcp --syn -j DROP
> this confuses me because of the "DROP" and the "--syn"
> Thanks,
> Doug
>
> -----Original Message-----
> From: Simpson, Doug
> Sent: Tuesday, January 14, 2003 1:59 PM
> To: 'netfilter@lists.netfilter.org'
> Subject: ssh
>
>
> I have acomputer I want to ssh to from the internet. What is the IPTABLES
> command to open this port?
> Thanks,
> Doug
>
if you're opening ssh to the machine itself then:
/sbin/iptables -A INPUT -p tcp -i eth0 -d <eth0 IP address> --dport 22 -j
ACCEPT
/sbin/iptables -A OUTPUT -p all -o eth0 -m state --state
RELATED,ESTABLISHED -j ACCEPT
if for a host behind the firewall:
/sbin/iptables -A FORWARD -p tcp -i eth0 -o ethx -d <ssh server
ipaddress> --dport 22 -j ACCEPT
/sbin/iptables -A FORWARD -p all -m state --state RELATED,ESTABLISHED -j
ACCEPT
some of those interface settings aren't compulsary like in the forward chain
but I like to put them in. I would suggest them though for the INPUT and
OUTPUT chains as you have more than one interface. Oh and maybe set the
default policy of all to DROP.
HTH
Zz
next prev parent reply other threads:[~2003-01-15 12:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-14 21:28 ssh Simpson, Doug
2003-01-15 12:09 ` Zander [this message]
2003-01-15 18:44 ` ssh MAB
-- strict thread matches above, loose matches on Subject: below --
2004-07-14 15:26 ssh Piszcz, Justin Michael
2004-07-14 15:42 ` ssh Antony Stone
2004-07-14 15:57 ` ssh Koyama Mituru
2004-07-14 16:07 ` ssh Antony Stone
2004-07-14 14:15 ssh IT Clown
2004-07-14 14:25 ` ssh Koyama Mituru
2003-01-14 19:59 ssh Simpson, Doug
2002-06-24 12:23 ssh Daniel Sercaianu
2002-06-24 13:31 ` ssh Antony Stone
2002-06-24 13:47 ` ssh Maciej Soltysiak
2002-06-24 13:56 ` ssh Ramin Alidousti
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='012101c2bc8f$04264f80$96ae6f83@classics.cam.ac.uk' \
--to=zander@subatomic.org.uk \
--cc=dsimpson@friedmancorp.com \
--cc=netfilter@lists.netfilter.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