Screen OS

 View Only
last person joined: 8 months ago 

This is a legacy community with limited Juniper monitoring.
  • 1.  NAT SSH Port 22 to something different

    Posted 10-06-2008 17:22

    I have figured out how to permit port 22 via VIP off of the untrusted int to my Linux box however I could do without China and Arabia trying to hack into my server all the time now. I would like to redirect the port 22 to something different so as to minimize my issue. Thanks in advance.

     

    Regards

    GW



  • 2.  RE: NAT SSH Port 22 to something different
    Best Answer

    Posted 10-06-2008 18:06

    Hi,

     

    So you want to listen to a different port on the untrust interface and then send it through to ssh on your internal server?

     

    On the VIP set it to listen to a different port, in this example port 2222

     

    Network > Interfaces > Edit (internet interface) > VIP: Enter the following

    address, then click Add:

    Virtual IP Address: select same as interface IP (or another public IP you have free)

    Network > Interfaces > Edit (internet interface) > VIP > New VIP Service: Enter

    the following, then click OK:

    Virtual IP: 1.1.1.1

    Virtual Port: 2222

    Map to Service: SSH (22)

    Map to IP: 192.168.1.10 (internal server you want to make public)

     

    You will need to create a custom service for the port that you want to listen on. Create a custom service "Custom SSH" with a destination port of 2222

     

     

    Create the Policy for access.

     

    Policies > (From: Untrust, To: Trust) New: Enter the following, then click OK:

    Source Address:

    Address Book Entry: (select), ANY

    Destination Address:

    Address Book Entry: (select), VIP(1.1.1.1)

    Service: Custom SSH

    Action: Permit

     

     

     

    This will mean that you ssh to port 2222 on IP 1.1.1.1 this will then forward through to port 22 on 192.168.1.10 on the internal network.

     

    hope this is what you are after

     

    Andy



  • 3.  RE: NAT SSH Port 22 to something different

    Posted 10-18-2008 18:22

    Thanks again andyc.