Re: IPTables configuration for SSH



On May 29, 7:00 am, David <david.goody...@xxxxxxxxx> wrote:
Hi all,

Im trying to pass through SSH through a firewall using IPTables. I
have got the passthrough working, however SSH does not still work.

I think it may be the following rule that is messing it up, could
anyone confirm this please:

Only allow connections inbound that are already established or related
through. All outbound are.

At the moment i can connect to the machine from inside the firewall so
i know ssh is running correct

I know port forwarding to a http server works, but to the ssh server
the connection times out?

Any ideas? Maybe people could send me the rules they use, for passing
SSH through to an internal machine?

Thanks in advance for your help and patience reading this

David



What does your "iptables -L" show?

How about flushing them once and trying,

iptables -A INPUT -p tcp --dport 22 -m state --state
ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p udp --dport 22 -m state --state
ESTABLISHED,RELATED -j ACCEPT


.



Relevant Pages

  • Re: Questions on some wierd /var/log entries
    ... How do I find out if I'm on an ipv6 network? ... That is because I prefer using iptables directly. ... then you should start learning about its firewall ... Another important restriction for ssh is to authenticate by certificate ...
    (comp.os.linux.misc)
  • Re: FC3 traffic cant get thru firewall
    ... time with the Linux firewall since upgrading FC2->FC3. ... going to say, its blocking port 22... ... SSH just stops authenticating. ... Its almost as if the iptables is allowing the port ...
    (Fedora)
  • iptables leaves 80/tcp `open ...why?
    ... a linux firewall protects the DMZ & internal lan from the Internet. ... I only wish 22/tcp (SSH) to be allowed into the firewall itself, ... iptables -N bad-if ...
    (comp.os.linux.security)
  • Re: [fw-wiz] Is NAT in OpenBSD PF UPnP enabled or Non UPnP?
    ... >> I start by not giving logins and SSH access to users I don't trust. ... a network topology which goes around the ... >> firewall and thus is a serious hole to network security. ... >> have access via UPnP to, well, anything that device might happen to ...
    (Firewall-Wizards)
  • Re: Boot order iptables problem?
    ... being able to ping the firewall server but I can surf the WWW. ... I have it running then re-run my iptables set-up script I lose the ... ability to ping or SSH the firewall server. ...
    (comp.os.linux.networking)