Solved

How to redirect ssh traffic on 2022 to port 22

Posted on 2006-07-19
15
1,167 Views
Last Modified: 2008-01-09
I need to redirect ssh on port 2022 from a public IP to an internal IP listening on port 22.  Currently, I have ssh setup for administration of the firewall.
0
Comment
Question by:cisco_2k2
  • 5
  • 4
  • 3
  • +1
15 Comments
 
LVL 22

Expert Comment

by:Rick Hobbs
ID: 17142598
What kind of firewall, what kind of router?
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17142635
looks like yuou need to setup port forwarding.... what type of firewall is it ?

baiscall you need to NAT public IP : 2022 to internal ip : 22
0
 

Author Comment

by:cisco_2k2
ID: 17142645
The firewall is an ASA 5510
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 22

Expert Comment

by:Rick Hobbs
ID: 17142684
If you redirect ssh to an internal device on port 22, you will no longer be able to manage the firewall with ssh.  Does that matter?
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17142689

You will want to put a command similar to:

static (inside,outside) tcp [external IP] 2022 [internal ip] 2022 netmask 255.255.255.255 0 0

     also, if you have an existing access list you will need something like

access-list [number of acl] permit tcp any host [external ip] eq 2022
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17142699
opps:"

static (inside,outside) tcp [external IP] 2022 [internal ip] 2022 netmask 255.255.255.255 0 0

should be

static (inside,outside) tcp [external IP] 2022 [internal ip] 22 netmask 255.255.255.255 0 0
0
 

Author Comment

by:cisco_2k2
ID: 17142830
Will I need to remove my existing ssh for the firewall administration to make this work?
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17142852
you really shouldn't... but lets see.

you already have port 22 (ssh) open for firewall adminsitartion from the internet correct ?

you want to to configure port 2022 to redirect to an internal box (linux?)  ssh.

so if yoiu connect to exteranl ip : 22  you hi the ASA  
if you connect to 2022 you hit the internal linux box.

if you redirected 22 to 22 then you would have problems, but you are using a alt. port for the other ssh.

make sense ?
0
 
LVL 22

Expert Comment

by:Rick Hobbs
ID: 17142911
Remove my stupid comment completely.  It should not cause any problems with the admin SSH.
0
 
LVL 32

Expert Comment

by:rsivanandan
ID: 17143653
Couple of modifications for Port Forward to work;

static (inside,outside) tcp interface 2022 [internal ip] 22 netmask 255.255.255.255 0 0

access-list [number of acl] permit tcp any host interface outside eq 2022

access-group [number of acl] in interface outside

Cheers,
Rajesh
0
 

Author Comment

by:cisco_2k2
ID: 17151020
After entering the following:
access-list [number of acl] permit tcp any host interface outside eq 2022

I am getting an error for the "interface" part of the string.  This is an ASA 5510 device.
0
 
LVL 5

Expert Comment

by:Dbergert
ID: 17151253
did you try the external IP ?
0
 
LVL 32

Accepted Solution

by:
rsivanandan earned 500 total points
ID: 17151334
access-list [number of acl] permit tcp any interface outside eq 2022

Enter this and see ? I mean, omit the host part.

Cheers,
Rajesh
0
 

Author Comment

by:cisco_2k2
ID: 17151463
That worked. Thanks!
0
 
LVL 32

Expert Comment

by:rsivanandan
ID: 17151467
No Problemo :-)

Cheers,
Rajesh
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
slow vpn connection 9 66
Valid LIN protocol Protected ID values 1 39
inserting an ACL line Cisco IOS XR Software, Version 5.3.3 2 40
Use of vpn-filter value  in S2S VPN 2 33
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question