Networking Forums

Networking Forums > Computer Networking > Linux Networking > IPTables configuration for SSH

Reply
Thread Tools Display Modes

IPTables configuration for SSH

 
 
David
Guest
Posts: n/a

 
      05-29-2007, 12:00 PM
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

 
Reply With Quote
 
 
 
 
Kalyan Manchikanti
Guest
Posts: n/a

 
      05-30-2007, 01:24 AM
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


 
Reply With Quote
 
David
Guest
Posts: n/a

 
      06-06-2007, 08:59 AM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some nat configuration problem with iptables. ChaoZhang Linux Networking 0 11-26-2006 08:20 AM
For Iptables configuration file KalarGyi@googlemail.com Linux Networking 3 03-24-2006 07:57 PM
iptables for IPSec (Cisco VPN) - where can I find a sample configuration? arabub Linux Networking 0 09-24-2003 04:52 PM
iptables for IPSec (Cisco VPN) - where can I find a sample configuration? arabub Linux Networking 0 09-07-2003 04:14 AM
AIM Express, squid, iptables configuration Mike Linux Networking 1 07-05-2003 03:34 PM



1 2 3 4 5 6 7 8 9 10 11