From: Georgi Alexandrov <georgi.alexandrov@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: opening port for SSH
Date: Fri, 09 Dec 2005 16:23:44 +0200 [thread overview]
Message-ID: <43999370.8010504@gmail.com> (raw)
In-Reply-To: <dn9dag$je3$1@sea.gmane.org>
Edwin Kapauni wrote:
> From the recent thread
> <http://www.spinics.net/lists/netfilter/msg33021.html> I have adopted
> this ruleset for a standalone computer.
>
> Now, I need some help teaching me how to open ports for SSH and VoIP.
> That shouldn't be too difficult, right?
>
> ######################### start ###########################
>
>
> iptables -F
> iptables -X
> iptables -Z
> iptables -t nat -F
> iptables -t nat -X
> iptables -t nat -Z
> iptables -t mangle -F
> iptables -t mangle -X
> iptables -t mangle -Z
>
>
> iptables -P INPUT DROP
> iptables -P FORWARD DROP
> iptables -P OUTPUT ACCEPT
>
>
> iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> iptables -A INPUT -i lo -j ACCEPT
> iptables -A INPUT -p icmp --icmp-type 3 -j ACCEPT
> iptables -A INPUT -p icmp --icmp-type 11 -j ACCEPT
> iptables -A INPUT -p icmp --icmp-type 12 -j ACCEPT
> iptables -A INPUT -p tcp --syn --dport 113 -j REJECT --reject-with
> tcp-reset
>
>
> ############################# end #################################
>
> Thanks for any help.
>
>
>
If you are running your ssh server on port 22, you should add the
following line to the script:
iptables -A INPUT -p tcp --syn --dport 22 -j ACCEPT
But i highy recommend bindind the ssh server to a higher port.
regards,
Georgi Alexandrov
next prev parent reply other threads:[~2005-12-09 14:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 13:43 opening port for SSH Edwin Kapauni
2005-12-08 14:23 ` /dev/rob0
2005-12-09 14:23 ` Georgi Alexandrov [this message]
2005-12-09 14:42 ` myhapwcforever
2005-12-09 15:37 ` Georgi Alexandrov
2005-12-14 16:02 ` Edwin Kapauni
2005-12-14 17:28 ` Rob Sterenborg
2005-12-14 17:39 ` Bjørn Ruberg
2005-12-14 20:36 ` Nick Drage
2005-12-14 22:06 ` Bjørn Ruberg
2005-12-14 20:46 ` Georgi Alexandrov
2005-12-10 14:43 ` myhapwcforever
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=43999370.8010504@gmail.com \
--to=georgi.alexandrov@gmail.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