Welcome, Guest. Please login or register.
Did you miss your activation email?
Monday 25 November 2024, 05:44:58 am

Login with username, password and session length

The Latest Endian Firewall is now available for download HERE
14261 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  EFW 2.3 Change SSH port number
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: EFW 2.3 Change SSH port number  (Read 19367 times)
xwin78
Jr. Member
*
Offline Offline

Posts: 5


« on: Saturday 05 December 2009, 09:58:49 am »

Hey EFW Community!

Is there a way to change the SSH port from 22 to something else?

Thanks
Logged
Nabiki
Jr. Member
*
Offline Offline

Posts: 3


« Reply #1 on: Friday 12 February 2010, 11:15:41 am »

I have the same question. 

I edited the  /etc/ssh/ssh_config file and changed the port but it still connects on port 22.  I need to connect on 443 so I can connect through proxy while on customers sites.

Logged
Steve
Sr. Member
****
Offline Offline

Posts: 108



WWW
« Reply #2 on: Friday 12 February 2010, 11:35:57 am »

Have you tried changing the port number in /etc/ssh/ssh_config.tmpl and then restarting?
Logged

                          
Nabiki
Jr. Member
*
Offline Offline

Posts: 3


« Reply #3 on: Friday 12 February 2010, 04:18:12 pm »

Yes.  I made the change in both  /etc/ssh/ssh_config.tmpl and  /etc/ssh/sshd_config.tmpl, with no luck.  It does change the port but I cannot seem to get it to connect. 

on port 22 it connects fine and when I change it to 443 I was able to verify that it is listening but I cannot get it to connect.  Checked listening ports with netstat and nothing else is on 443 so it should not be a port conflict.


root@Firewall:~ # netstat -lnptu | egrep 'Proto|LISTEN' | grep 443
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:10443               0.0.0.0:*                   LISTEN      3120/httpd
tcp        0      0 :::443                      :::*                        LISTEN      3038/sshd       
Logged
mrkroket
Hero Member
*****
Offline Offline

Posts: 495


« Reply #4 on: Saturday 13 February 2010, 02:03:53 am »

Maybe a port forwarding from 443 to 22?
Logged
Nabiki
Jr. Member
*
Offline Offline

Posts: 3


« Reply #5 on: Saturday 13 February 2010, 08:16:21 am »

Finally dug up the rule for anyone that is trying to do this. 

After the changes to the /etc/ssh/ssh_config.tmpl and /etc/ssh/sshd_config.tmpl the changes can be done through the web page by "Firewall -> System Access -> Add rule".   It will need to be assigned to the interfaces that you want SSH access to. 

Test to make sure that this is the issue can be performed by using the iptables command from the shell to make it accept the inbound traffic.  Not persistent between reboots so better to do it through the web interface.

iptables -I INPUT 1 -p tcp --dport 443 -m state --state NEW -j ACCEPT

Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.094 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com