CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting 11/3, 12/8, (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3, 9/7.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 And Related Products > SmartDefense
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-03-29
mtoadmin mtoadmin is offline
Junior Member
 
Join Date: 2006-03-29
Posts: 4
Rep Power: 0
mtoadmin has an average reputation (10+)
Default SSH on non standard ports

Hello everyone,

I'de like to block SSH on non standard ports. So far so good. But I also would like to allow SSH on a specific non standard port different from 22.
For example 22 and 229: allow SSH v2. Any other ports, SSH disallowed.
Does anyone know how to achieve this ?

thanks

mtoadmin
PS: I am current using NGX
Reply With Quote
  #2 (permalink)  
Old 2006-03-29
kva.kva kva.kva is offline
Senior Member
 
Join Date: 2006-01-26
Location: Moscow, Russia
Posts: 706
Rep Power: 3
kva.kva has an average reputation (10+)
Default Re: SSH on non standard ports

Add TCP service 229, edit its avanced properties. You need change Protocol Type to SSH2.

About blocking - check SmartDefence -> Application Intelligence -> VPN Protocols -> SSH -> Detect SSH over Non Standard Ports
Reply With Quote
  #3 (permalink)  
Old 2006-03-29
mtoadmin mtoadmin is offline
Junior Member
 
Join Date: 2006-03-29
Posts: 4
Rep Power: 0
mtoadmin has an average reputation (10+)
Default Re: SSH on non standard ports

This was our first try but it didn't seem to work (at least for us)
Did you test this ?
We are on NGX
If you look in updates.def inspect code, it seems coded as 22 only. I'm trying to modify this file.

thanks
Reply With Quote
  #4 (permalink)  
Old 2006-03-29
mtoadmin mtoadmin is offline
Junior Member
 
Join Date: 2006-03-29
Posts: 4
Rep Power: 0
mtoadmin has an average reputation (10+)
Default Re: SSH on non standard ports

ok, found it.
In updates.def

change as follow:

#define SSH_PORT_NUMBER 22
#define SSH_PORT_NUMBER2 229

#define ADP_SSH_V2_MATCH \
(tcp, syn, not ack,((dport=SSH_PORT_NUMBER) or (dport=SSH_PORT_NUMBER2)),ADP_SSH_V2_VER2_ONLY)

#define ADP_SSH_NO_22_MATCH \
( \
tcp, syn, not ack, \
dport != SSH_PORT_NUMBER, dport != SSH_PORT_NUMBER2, \
( \
ADP_SSH_NO_22_ACTION = SSH_BLOCK_WRONG_PORTS \
or \
ADP_SSH_NO_22_ACTION = SSH_NO_22_VER_2_ONLY \
) \
)
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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 10:46.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0