On 30 May, 02:24, Kalyan Manchikanti <kalyan.manchika...@gmail.com>
wrote:
> On May 29, 7:00 am, David <david.goody...@gmail.com> 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- Hide quoted text -
>
> - Show quoted text -
Hi thanks for the reply.
Once i added iptables -t nat -F to the script the rules worked
thanks

There must have been some old rules in there against the
port numbers i was attempt to test with.
Thanks for all the help