Networking Forums

Networking Forums > Computer Networking > Linux Networking > Unable to get ssh through nated iptables

Reply
Thread Tools Display Modes

Unable to get ssh through nated iptables

 
 
gaur_ms@yahoo.co.in
Guest
Posts: n/a

 
      12-18-2005, 10:49 AM
Hi,
I am trying to get through iptables firewall to get ssh to an internal
machine. On the firewall machine, the following are the ules I have
added to get ssh request forwarded to the internal machine:
output of iptables -L -v (the following additional rules I have added
into the existing firewall)
............................

0 0 ACCEPT tcp -- eth2 any anywhere
anywhere tcp dpt:ssh
0 0 ACCEPT udp -- eth2 any anywhere
anywhere udp dpt:ssh
.............................................

0 0 ACCEPT tcp -- eth2 eth1 anywhere
anywhere tcp dpt:ssh

eth2 is the external interface and eth1 is the inetrnal interface.

When I try to ssh to the firewall machine, it asks for the password and
then after three tries rejects it!
Eeven when I try to ssh the firewall machine from itself it rejects as
well!
Do I need to change some configuration of ssh as well, I am slightly
lost !!
Thanks in advance
Karmath

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      12-18-2005, 11:53 AM
(E-Mail Removed) wrote:
> Hi,
> I am trying to get through iptables firewall to get ssh to an internal
> machine. On the firewall machine, the following are the ules I have
> added to get ssh request forwarded to the internal machine:
> output of iptables -L -v (the following additional rules I have added
> into the existing firewall)
> ...........................
>
> 0 0 ACCEPT tcp -- eth2 any anywhere
> anywhere tcp dpt:ssh
> 0 0 ACCEPT udp -- eth2 any anywhere
> anywhere udp dpt:ssh
> ............................................
>
> 0 0 ACCEPT tcp -- eth2 eth1 anywhere
> anywhere tcp dpt:ssh
>
> eth2 is the external interface and eth1 is the inetrnal interface.
>
> When I try to ssh to the firewall machine, it asks for the password and
> then after three tries rejects it!
> Eeven when I try to ssh the firewall machine from itself it rejects as
> well!
> Do I need to change some configuration of ssh as well, I am slightly
> lost !!



If it asks for the password, it is not a firewall issue.

Are you attempting to log in as 'root'?

If yes, try using another username in the
target computer. Pretty many SSH installations
disable direct log in as 'root' for a good reason,
DO NOT CHANGE IT!

To get in as root, log in as another username
and use su or sudo to gain root access.

--

Tauno Voipio
tauno voipio (at) iki fi
 
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
VPN to a server behind a firewall on NATed network yaro137 Windows Networking 7 05-19-2009 11:05 AM
ISP Cutover - Multip NICs on NATed Linux Box ecross@gmail.com Linux Networking 2 04-13-2006 05:57 PM
Unable to renew IP address/unable to connect to wireless network JaseyBoy Wireless Networks 1 12-22-2005 03:28 AM
Looking for iptables applications code (iptables.c) to run some rules to forward packets tvnaidu@yahoo.com Linux Networking 2 01-17-2005 05:01 PM
NIS yppasswd command and iptables?? RPC: unable to receive Ryan Hubbard Linux Networking 5 05-10-2004 06:39 PM



1 2 3 4 5 6 7 8 9 10 11