Results 1 to 7 of 7
Thread: SSH Related Questions - Pls Help
-
07-03-2024, 09:58 AM #1
Web Hosting Guru
- Join Date
- Nov 2007
- Posts
- 252
SSH Related Questions - Pls Help
Hi Guys.
I want to restrict access to my SSH port on cpanel/whm to certain IP addresses or to block it, how do I do this?
Also, how do I change the SSH port from 22 to any other number on cpanel/whm
Kindly note that I have ConfigServer Security & Firewall installed on the cpanel
Thank you very much.
Just Here To Learn
-
07-03-2024, 10:27 AM #2
There's a few different options you could use to restrict SSH to certain IP space, such as for example Host Access Control: https://docs.cpanel.net/whm/security...ccess-control/
Another option is via CSF: https://forum.configserver.com/viewt...bfdbbe6c#p3471
To change the SSH port, see https://support.cpanel.net/hc/en-us/...e-the-SSH-port~]# Ethernet Servers Ltd - Est. 2014! - hello @ ethernetservers.com
~]# Try out our WordPress speed tests for yourself!
~]# NVMe Web Hosting | Unmanaged VPS | Dedicated Servers | Domain Names
~]# Don't settle for any less than the very best - come & join our family today!
-
07-03-2024, 11:28 AM #3
Web Hosting Guru
- Join Date
- Nov 2007
- Posts
- 252
Kindly share details with me. It seems I am yet to get it right.
Just Here To Learn
-
07-03-2024, 11:55 AM #4~]# Ethernet Servers Ltd - Est. 2014! - hello @ ethernetservers.com
~]# Try out our WordPress speed tests for yourself!
~]# NVMe Web Hosting | Unmanaged VPS | Dedicated Servers | Domain Names
~]# Don't settle for any less than the very best - come & join our family today!
-
07-19-2024, 12:01 AM #5
1: Use CSF
2: Remove the port from csf configs in WHM
3: Add your whitelisted IP's to CSF
You can't change the ssh port directly within WHM, however you can do so directly from SSH
just go to /etc/sshd/sshd_config and change in thereTom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
07-30-2024, 11:34 PM #6
Newbie
- Join Date
- Jul 2024
- Posts
- 10
If you have SSH access, can you not login through SSH, and edit the SSH configuration files?
You can also use iptables to whitelist IPs:
This command block will restrict port 80 and 443 to 202.181.177.177 IPv4 address, and will not accept connections from any other IPs.
iptables -N xxx # create a new chain named xxx
iptables -A xxx --src 202.181.177.177 -j ACCEPT
iptables -A xxx -j DROP # drop everyone else
iptables -I INPUT -m tcp -p tcp --dport 80 -j xxx
iptables -I INPUT -m tcp -p tcp --dport 443 -j xxx
-
07-31-2024, 01:25 AM #7
Web Hosting Industry Expert
- Join Date
- Dec 2007
- Location
- Indiana, USA
- Posts
- 19,499
Absolutely, although from the questions they've asked it seems they're not an experienced systems administrator and may not know how to actually do that. Everyone starts somewhere.
As they already have CSF installed, there's no reason to manually manage the IPTables rules for this.█ Michael Denney - MDDHosting.com - Trusted by more than 37,000 websites since 2007.
█ Ultra-Fast Cloud Shared and Pay-By-Use Reseller Hosting Powered by LiteSpeed!
█ cPanel • Free SSL • 100% Uptime SLA • 24/7 Support
█ Class-leading support that responds in minutes, not days.
Similar Threads
-
Noob php related question....pls help!
By Eric Karsh in forum Programming DiscussionReplies: 4Last Post: 10-02-2010, 08:46 PM -
TOMCAT Questions (pls help)
By stephenn in forum Hosting Security and TechnologyReplies: 2Last Post: 08-30-2002, 11:57 PM -
2 questions, please help:)
By kdp80 in forum Web HostingReplies: 9Last Post: 03-25-2001, 05:34 AM -
I need a host for high traffic site. Pls Help!
By emmanuel in forum Web HostingReplies: 14Last Post: 12-23-2000, 07:20 AM -
My first site's template, pls help
By Nam in forum Web Site ReviewsReplies: 7Last Post: 11-19-2000, 04:05 AM