Go Back   Defender Hosting Forums > PowerVPS Virtual Private Servers > Linux VPS - Security and Tuning

Linux VPS - Security and Tuning Security and Tuning Discussion for Linux Virtual Private Servers based on Virtuozzo by SWsoft

Reply
 
Thread Tools Display Modes

  #11  
Old 08-05-2005, 11:21 AM
Soul
Guest
 
Posts: n/a
Default

I have something to add. You can add a layer of complexity to your SSH by having some fun with firewall rules.

I found this little gem after I just installed Centos4.1 on the machine I am about to send to colocate with you guys.

http://www.hostlibrary.com/A-Cure-fo...ck-195586.html

Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -m recent --rcheck --name SSH -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1600 -m recent --name SSH --set -j DROP
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1601 -m recent --name SSH --remove -j DROP
-A RH-Firewall-1-INPUT -j DROP
What this would allow is that in order to even enable SSH you have to first send a telnet unlock request to port 1600 then you can SSH into 22. When you are done with the port you can close it by telnetting to port 1601.

This also only unlocks port 22 for the location in which you performed the unlock command.
Reply With Quote

  #12  
Old 08-05-2005, 12:17 PM
charles charles is offline
Senior Member
 
Join Date: May 2004
Location: Virginia
Posts: 1,327
charles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud of
Default

Wow, thats awesome! Nice one!
Reply With Quote

  #13  
Old 08-05-2005, 02:11 PM
Soul
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by charles
Wow, thats awesome! Nice one!
Also ... neither port 1600 and 1601 are even open. ipchains merely notices you trying to access it. So a general port scan might open ssh by telnetting 1600 but then might immediately close it when it hits 1601.

I wish I had the knowledge to come up with this stuff. I think this is a great way to lock your SSH. But in each case you should consider changing the ports you use to unlock, instead of just leaving them as 1600 and 1601

As he said on the page, you could also setup so that you have to hit two ports in a specific order to open up ssh. I think that this would make it bullet proof.
Reply With Quote

  #14  
Old 08-17-2005, 10:48 AM
chief's Avatar
chief chief is offline
Senior Member
 
Join Date: Jul 2005
Location: Schenectady, NY
Posts: 118
chief is on a distinguished road
Send a message via AIM to chief
Default

Can someone point me to a good tutorial on linux user management? I want to disable root SSH access and create a user that has just about all the root abilities without having to 'sudo' everytime, is that possible?
Reply With Quote

  #15  
Old 08-17-2005, 01:42 PM
jpetrov
Guest
 
Posts: n/a
Default

what's wrong with sudo su - ?
Reply With Quote

  #16  
Old 08-18-2005, 03:20 PM
charles charles is offline
Senior Member
 
Join Date: May 2004
Location: Virginia
Posts: 1,327
charles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud ofcharles has much to be proud of
Default

Quote:
Originally Posted by chief
Can someone point me to a good tutorial on linux user management? I want to disable root SSH access and create a user that has just about all the root abilities without having to 'sudo' everytime, is that possible?
You can give fine grained access wiith sudo, or plain stupid blanket root access with no password required. So if your issue is just having to enter you password you can avoid that (but would still need to prefix commands with sudo). Best would be to give limited access to certain script, with no password (again if entering your password is the issue). Otherwise rething your need for this.

You can also ceate a user and change their uid and group to 0. This is a root user with a different name, and not really advised either. About the only think you have achieved is allow root ssh by a different name.

hth
charles
Reply With Quote

  #17  
Old 08-19-2005, 09:46 AM
chief's Avatar
chief chief is offline
Senior Member
 
Join Date: Jul 2005
Location: Schenectady, NY
Posts: 118
chief is on a distinguished road
Send a message via AIM to chief
Default

Quote:
Originally Posted by jpetrov
what's wrong with sudo su - ?
Duh, yeah, that works, thanks.

I was just looking at my secure logs, and noticed someone trying ssh access with tons of user names / pw combos. Is there a way to prevent these types of attacks?

Last edited by chief; 08-19-2005 at 09:53 AM..
Reply With Quote

  #18  
Old 08-19-2005, 10:54 AM
elix elix is offline
Senior Member
 
Join Date: Jun 2005
Posts: 787
elix is on a distinguished road
Default

Quote:
Originally Posted by chief
Duh, yeah, that works, thanks.

I was just looking at my secure logs, and noticed someone trying ssh access with tons of user names / pw combos. Is there a way to prevent these types of attacks?
BFD can help with that.
http://rfxnetworks.com/bfd.php
__________________
Got clue?
Reply With Quote

  #19  
Old 08-22-2005, 01:31 PM
chief's Avatar
chief chief is offline
Senior Member
 
Join Date: Jul 2005
Location: Schenectady, NY
Posts: 118
chief is on a distinguished road
Send a message via AIM to chief
Default

Quote:
Originally Posted by elix
BFD can help with that.
http://rfxnetworks.com/bfd.php
OK, forgive my ignorance...

I've installed BFD, is this just a notification tool though? Or is it actually denying requests?
Reply With Quote

  #20  
Old 08-22-2005, 03:11 PM
elix elix is offline
Senior Member
 
Join Date: Jun 2005
Posts: 787
elix is on a distinguished road
Default

Quote:
Originally Posted by chief
OK, forgive my ignorance...

I've installed BFD, is this just a notification tool though? Or is it actually denying requests?
Yeah it integrates with APF so it will deny requests.
__________________
Got clue?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Down rts2271 Linux VPS - General 5 11-02-2006 07:14 AM
VPS Security FAQ Tony Linux VPS - HOWTOs and FAQs 0 03-04-2005 09:56 AM
Windows VPS Beta Testing Begins! TomK Windows VPS - General 7 03-04-2005 01:32 AM
VPS Security Questions... SlAiD Linux VPS - Security and Tuning 4 02-24-2005 07:06 PM



All times are GMT -4. The time now is 02:13 AM.


vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright Defender Technologies Group, LLC 2006