Hi,
there is an another nat row that using SSH:
ip nat inside source static tcp 192.168.1.150 22 interface Dialer0 2222
try to disable it first!
Best Regards,
Istvan
Main Topics
Browse All TopicsCould someone please help with a beginner cisco 877 question
We have a cisco 877 configured as a ADSL gateway. The suppliers have been requested to port forward a server with the address 192.168.1.4 on 22 so that we have SSH access from the internet.
This is my first time looking at a Cisco router. The supplier configured
ip nat inside source static tcp 192.168.1.4 22 interface Dialer0 22
but the connection did not work at all
I have just tried
config t
ip access-list ext 101
permit txp any any eq 22
end
and now my external SSH client connects but the server does not respond to the correct password.
From inside the network it's fine
We don't seem to have an external connection in the router
Can anyone help with this please?
Config file is below
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Zenith63
Thanks very much for your response!
Just tried as suggested but it does not respond to the normal (internal) username and password, nor the server root password.
The router was responding with a timeout until I made the entry
config t
ip access-list ext 101
permit txp any any eq 22
end
It is after this entry that it started responding on 22.
I'd be very grateful for any more tips !
Kind regards
Prema
Hi Istvan!
Complete beginner here but from the supplier's comment it appears that this is IP access for the VOIP box (TrixBox) and the 2222 is the external access port- Apparently it is possible to have more than one port 22 internally as long as the external ports are different.
Any comments welcome -- thanks very much for your response
Kind regards
Prema
I could be wrong ikalmar, but the first rule forwards port 2222 to one internal server while the second forwards port 22 to a different internal server. On the internal side both servers are listening on port 22, but this should work fine as it is what NAT is meant to do.
ip nat inside source static tcp 192.168.1.150 22 interface Dialer0 2222
External:2222 -> 192.168.1.150:22
ip nat inside source static tcp 192.168.1.4 22 interface Dialer0 22
External:22 -> 192.168.1.4:22
prema2909 - Your access-list entry is just a firewall rule allowing from ANY to ANY with SSH protocol. So if the Cisco router itself is listening for SSH traffic (ie. for people to log on to it and admin it using SSH instead of telnet) which is the default setup I think, then by adding your access list you've basically opened up WAN administration of your Cisco using SSH. So when SSH traffic comes to the public IP, instead of the Cisco forwarding it on to the internal box it thinks the traffic is meant for it for administration, so doesn't forward it. You can confirm this easily enough by trying your Cisco admin/enable password at the prompt and see if it lets you in, or change the internal server to listen on 222 and forward that through. This is probably the exact reason there is a rule there already forwarding port 2222 through, somebody in the past needed to SSH through to an internal box but couldn't use port 22 because the Cisco router itself already uses this.
prema - I'm heading out now so won't be able to reply until tomorrow but I would suggest you try either disabling SSH on the Cisco (assuming you are using telnet to admin it!) with
no ip ssh server
Or another thought that just came to mind is that you don't need to change the internal server to a different port, just change the external port number. So remove your ip nat rule -
no ip nat inside source static tcp 192.168.1.4 22 interface Dialer0 22
Then add one back that says
ip nat inside source static tcp 192.168.1.4 22 interface Dialer0 222
Remove your access-list entry
no access-list 101 permit tcp any any eq 22
Then add one back in like
access-list 101 permit tcp any any eq 222
Then from outside try and ssh to the public IP on port 222 instead of 22, that should get you to your internal server! Final config on Cisco should be like -
Hi Zenith63!
Have tried the config as suggested and for some reason we're still not getting to it!
Will read through the config and your advice carefully -- this seems a bit tricky. Will also check my local firewall in case it is blocking my non standard SSH port
Any comments welcome
Thanks indeed Ikalmar -- we're grateful to have your thoughts
Kind regards
Prema
Business Accounts
Answer for Membership
by: Zenith63Posted on 2009-08-18 at 03:58:59ID: 25121787
My Cisco is pretty limited, but jsut a couple of observations that might get you started before the gurus arrive.
Are you sure when you SSH from outside to the public IP of the Cisco it's not the Cisco itself that is replying and trying to authenticate you instead of your internal box? SSH admin on the Cisco is not explicity disabled (as HTTP admin is for instance 'no ip http server'). From external try your Cisco admin credentials and see if you get the Cisco admin prompt, you probably will. If so you can either disable SSH admin of the Cisco (not sure the exact command, but 'no ip ssh server' is likely to be it, just make sure this isn't what you're using to admin it at the moment!) or tell you internal server to listen on 222 and forward that port through so it isn't conflicting with the SSH listening on the Cisco.
Check this first and come back as I suspect it might be the problem.