Results 1 to 20 of 20
Thread: Change ssh port
-
07-31-2014, 06:44 PM #1WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
Change ssh port
everytime i change ssh port i am getting many problems !
what i do is :
- i change ssh port and uncomment #22 from sshd_config and restart sshd
then i reboot my system and after rebooting i will not be able to connect to 22 or the new port n that happend after reboot but before reboot it work fine and after reboot no :/
i am using Centos7 BetaLast edited by CooLbre; 07-31-2014 at 06:50 PM.
-
07-31-2014, 06:45 PM #2Web Hosting Master
- Join Date
- Sep 2002
- Posts
- 918
Check iptables to see if it is blocking inbound connections to your new SSH port.
-
07-31-2014, 06:51 PM #3WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
07-31-2014, 07:10 PM #4WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
i did that many time adding port to ip table and nothing happend it's the same thing happening everytime
-
07-31-2014, 07:26 PM #5Junior Guru
- Join Date
- Oct 2013
- Location
- /dev/shm
- Posts
- 222
edit /etc/ssh/sshd_config and change your ssh port
run : iptables -A INPUT -p tcp --dport xxxx -j ACCEPT
service iptables save
change xxxx to your new SSH port number.
-
07-31-2014, 07:38 PM #6WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
07-31-2014, 07:40 PM #7Junior Guru
- Join Date
- Oct 2013
- Location
- /dev/shm
- Posts
- 222
Do you have a firewall? or panel like cpanel/plesk?
-
07-31-2014, 07:54 PM #8WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
07-31-2014, 07:58 PM #9Junior Guru
- Join Date
- Oct 2013
- Location
- /dev/shm
- Posts
- 222
What do you have? cpanel and csf ?
-
07-31-2014, 08:08 PM #10WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
i found this on my cpanel , only that i know !
how can i configure it's the firewall :
http://i.imgur.com/jQsCzBs.jpg
-
07-31-2014, 08:23 PM #11Junior Guru
- Join Date
- Oct 2013
- Location
- /dev/shm
- Posts
- 222
-
07-31-2014, 08:26 PM #12Eternal Member
- Join Date
- Dec 2004
- Location
- New York, NY
- Posts
- 10,710
To fix your issue remove the default firewall rules in /etc/sysconfig/iptables - there's probably default rules restricting port access in there.
MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business
-
07-31-2014, 08:54 PM #13WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
07-31-2014, 09:55 PM #14Web Hosting Guru
- Join Date
- May 2014
- Location
- Turkey
- Posts
- 261
Djjezus those people here on wht got nerves of steel.
-
07-31-2014, 11:31 PM #15WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
so can i make ssh login only can be done with dns pointed to my ip address ! i have dynamic ip change every reboot of my connection , i have ea dommain and i want point a record to my ip from manager every time i want login to ssh ! so is this possible ? if yes pleasse tell me how to do it !
also i want disallow some dns which abusing on login attemps from login to ssh !
ThanksLast edited by CooLbre; 07-31-2014 at 11:40 PM.
-
08-01-2014, 03:16 AM #16Web Hosting Guru
- Join Date
- May 2014
- Location
- Turkey
- Posts
- 261
-
08-01-2014, 05:39 AM #17WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
08-01-2014, 06:39 AM #18Web Hosting Guru
- Join Date
- May 2014
- Location
- Turkey
- Posts
- 261
ok, now I understand.
According to my poor/low experience, the easiest way to block ip addresses, is using ConfigServer Firewall, also known as CFS. http://configserver.com/
If you use CFS with webmin (you have to activate cfs module in webmin) you can block whichever ip you want easily from a web interface.
The biggest feature of CFS is; if you set it to medium or high security, it automatically bans ip addresses which are trying bruteforce on your server.
1- install cfs
2- install webmin
3- install cfs module on webmin
4- you're good to go!
-
08-01-2014, 08:03 AM #19WHT Addict
- Join Date
- Jun 2014
- Posts
- 123
-
08-01-2014, 08:22 AM #20Web Hosting Guru
- Join Date
- May 2014
- Location
- Turkey
- Posts
- 261
CFS has DDOS protection also, but not as strong as a dedicated hardware I suppose (i.e. Juniper)
I dont know nothing about ovh, but both use iptables I guess. Therefore it doesn't matter I think.
Similar Threads
-
Why cannot change SSH port?
By chasebug in forum Dedicated ServerReplies: 5Last Post: 02-19-2011, 06:35 PM -
Change ssh port but the system use the old one
By hostyourdream in forum Hosting Software and Control PanelsReplies: 4Last Post: 10-06-2010, 11:12 AM -
how change ssh port
By mixmox in forum Hosting Security and TechnologyReplies: 6Last Post: 04-17-2009, 12:51 PM -
Change SSH Port to FTP Port 21
By jojo235 in forum Hosting Security and TechnologyReplies: 6Last Post: 03-22-2005, 06:06 PM -
change ssh port to something else?
By floyd06 in forum Hosting Security and TechnologyReplies: 4Last Post: 07-05-2003, 10:57 AM