Solved

How to redirect ssh traffic on 2022 to port 22

Posted on 2006-07-19
15
1,161 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:rickhobbs
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
 
LVL 22

Expert Comment

by:rickhobbs
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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:rickhobbs
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Lets look at the default installation and configuration of FreeProxy 4.10 REQUIREMENTS 1. FreeProxy 4.10 Application - Can be downloaded here (http://www.handcraftedsoftware.org/index.php?page=download) 2. Ensure that you disable the windows fi…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now