Error 

Archive for the ‘Security’ Category

First PGP Key Signing Party

Posted January 25, 2010 at 02:01am in Security

Friday was my first time attending a PGP key signing party. We had it in one of the buildings on campus and I thought I would share some of the commands I used to handle all the certificates. I created a method for handling key signing parties while I did this one, but I think this is a fairly good method. What it basically does is keeps specific users in your pubring.gpg, while people at keysigning parties are in specific keyrings. When defining them in your gpg.conf file they will be included in all of your GPG operations so it will be like they were in your pubring.gpg keyring. It also means that if you don’t associate with anyone in the keysigning parting you can just comment out the file and still have the keys for later use or for archival purposes.

I first wanted to have these be in a specific keyring for the purposes of knowing who was at each keysigning. To make sure your key gets added to the keyring you need to specify not to use the default keyring and use a specific keyring.. Make sure you include your keyid in the list of keys to pull from the keyserver as it will be needed when PIUS runs against the specific keyring.
Read the rest of this entry »

Locking down your server

Posted October 19, 2008 at 10:10pm in Security, Sys Admin

Update: I just thought about binding to a specific address to help prevent others from being able to ssh into a server. This is similar to changing the port except that there are a limited number of ports, you could bind to xf1er.domain.com and it would be forever before someone was able to brute force the address alone unless the DNS servers allowed zone transfers. The best solution is to probably use a dedicated IP address for ssh, one that nothing else is using and that nothing can resolve to. The reason is that say you had set ListenAddress to xf1er.domain.com if that resolves to the same IP as domain.com or www.domain.com it will still let you ssh in. It is not like setting the address for a particular site in Apache, where it will actually need to match the domain name.

Recently someone on the SoCal LinuxUsers mailing list was asking for information, a checklist or sorts on procedures to lock down your Linux box when putting it on the big bad internet. I will probably collect a lot more of these and make a real checklist, but this will get you started. Note that some of the configuration directives for OpenSSH are already set by default, I prefer to make the change in the config file anyway to ensure those things are set. You never know when an error might occur in an update and something could have been maliciously changed in the code or an accident happened.

  • Install and Configure DenyHosts

    DenyHosts will add hosts to your /etc/hosts.deny file based on criteria you set and if you like it can download a file which is updated with hosts currently violating DenyHosts policies on other machines. For a lot of services you have to run them in xinetd or inetd for TCP wrappers to work, without TCP wrappers being involved in the daemon hosts.deny/hosts.allow will do nothing for you. The alternative to xinetd and inetd being involved is support for the libwrap library, which most OpenSSH packages have built in when compiled. You can check if a daemon has libwrap support by following the guide on ducea.com ((How to find out if a daemon was build with TCP Wrappers support)).

    All about Linux has a good post explaining how to use TCP wrappers to secure Linux ((All about Linux: Using TCP Wrappers to secure Linux)).

  • Read the rest of this entry »