|
.: linux archive
There are scripts and various automatic ways of hardening a Linux system, but nothing is more informative and instructive than doing many of the tweaks and settings manually. I liked this post because it really delved into a few of the particulars and exactly what is going on.
by LonerVamp 07.09.06 at 12:13 PM in /linux - comments(0)
by LonerVamp 07.09.06 at 12:54 PM in /linux - comments(0)
So, when I get around to testing my linux firewall, I can use ftester along with this "how to" guide.
by LonerVamp 08.08.06 at 11:30 PM in /linux - comments(0)
I am really toying with the idea of plunging fully into Linux...while also just testing with my toes again. Hrmm...
I've run Linux in the past, from Red Hat version 7 up to SuSE 9.x and various Livecd incarnations. But I've never been able to stick with an install for long enough to really immerse myself into it. Red Hat 7 was interrupted due to a need to do some resume/website work back after college when I was unemployed. SuSE was interrupted by my need for gaming...mulitiple times.
But the gap between Linux and Windows, especially the apps in Windows that I rely on a day-to-day or weekly basis, is greatly diminished now, if not gone altogether. The only real gaps would be ease of use of all the years of acquiring apps and programs to do certain tasks, the support for gaming, and the support for wireless.
The years of acquiring apps may be interrupted soon by Windows itself...who knows what Vista will be changing when it finally releases, but it will be a whole new world to learn anyway (although not entirely). The support for gaming has been getting better, but only slowly. Thankfully, having a gaming-only machine is not a bad idea, especially since any Linux that I run will not need beefy specs or expensive machines. And support for wireless has been getting better in leaps and bounds, to the point that some of my Livecds recognize my wireless laptop right from the install, and get online with absolutely no work on my part.
But, I do still game, and I do still have a lot of things on my XP laptop that I just can't part with quite yet, especially since it's the only machine that seems to accept any of my old Windows XP keys and licenses (damn Genuine Advantage, in the end, it will end up driving me away from Windows...).
So, one thing I really want to do is make sure I have Linux on a laptop, which does greatly limit my choices on my systems. I think I might give another shot to dual-booting or even just running VMWare Workstation on my laptop and carving out some space for a Linux install. I know my system is that all that robust (512MB RAM), but I think if I go ahead and wipe it off and reinstall Windows XP, it should be cleaned up enough to allow me to run a VM Linux (Ubuntu or SuSE again).
This post started out with me wondering to myself where I should put Linux and work it into my daily life, up to listing my systems and the pros and cons...but I think I already just talked myself through my plan.
This will leave me my gaming system, a possibility for less intensive games on my laptop, and leave me other lesser-speed Windows 2000 laptops for other uses. My other desktop-class systems can then still be whatever, as they are just used in my lab.
First order of business though: clean off the XP laptop, back everything up that I need or want, take inventory of what I need to replace, and start to organize up my tools and tempfolder (a dropbox for all sorts of incoming things that I've not played with, tried out, or used enough to file them away to keep or delete).
by LonerVamp 08.28.06 at 1:23 PM in /linux - comments(0)
I have used Linux here and there in the past 5 years, but in the past 2 years, my experience has been drastically limited to livecds (which, in their own right, are really awesome anyway!). I've long wanted to get away from Windows since I know 95% of what I'll ever know about Windows XP and previous anyway, and I really want to use a Mac or Linux box as my main OS at home for various reasons.
I've never made the jump and kept putting it off due to this reason or that, most notably two major reasons: I wanted to play WoW, which is difficult for anyone on Linux, and I wanted easy wireless access that wasn't a bitch to configure, support, or install. Wireless support has gotten better in the past few years, and my laptop really is not nearly as fun to play WoW on as my resurrected gaming rig. So...all the big barrier reasons are gone!
This weekend I went out and bought a new laptop drive, 100GB. My plan was to dual boot Windows and Ubuntu Linux and also have some room to run a VM in Ubuntu and Vm another Windows install or two plus others. The reason to dual-boot is so that I can get true wireless on both OS, since any VM is going to think it is on a wired connection. More on this later...
So I swapped my drive and put in Ubuntu 6.06 desktop. I did an install, it performed a format on my drive and was done. I literally blinked a few times and figured something screwed up or the instructions were incomplete. I rebooted Ubuntu from the livecd, saw that I had missed nothing, and on a whim decided to reboot without a cd. Sure enough, Ubuntu started up just fine and had been installed on the HD just like that. Wham! That's the shortest install of an OS I've ever had!
The sad thing, though, is the Ubuntu partition support. It is basically an all-or-none approach and I didn't get much help or options in doing manual partitioning. Unfortunately, the automatic part made me use all 100GB of the disk for ext3. Hrmm..well, I guess I can live with that for now and just swap hard drives when I want to go Windows. I may have to add in a mini-project to see if I can get an external enclosure and boot from it, but that's another project.
So, Ubuntu was working. In fact, both my wired and wireless network cards were recognized immediately. I hooked into my wired network, got an IP address, connected to my wireless AP to get my WEP key (yes I use WEP because I practice breaking my own network with various tools...long story), and configured up my wireless. Big props to Ubuntu, as it took on the first try and I had wireless on Linux with zero blood and sweat. Wow!
Now, I'm swapping back and forth between my hard drives and Windows and Linux as I move all my tasks and things I do on Windows over to Linux one by one. Hopefully in the next week or two, I will be running Ubuntu 95% of the time my laptop is powered on. The only snag may be if I figure out how to most properly carve up my disk so that I can still dual-boot Ubuntu and Windows XP. This might mean installing XP first and using it to format the disk, then seeing if Ubuntu will limit itself to whatever space is still open. I'd like to just do about 35GB for Ubuntu (ext3), 15Gb for Windows XP (NTFS), and the rest for either shared space (FAT) or VMs.
Next steps: Opening up Synaptic to allow me to install packages from the universe and multiverse, finding the root password (yeah, go figure, I couldn't find it and it never asked me for one on the install?) so I can su up, and getting some common apps installed that I use on a daily basis, such as Thunderbird, gaim (or a Linux equivalent to gaim), and mp3 player. Now that I think about it, my ipod support may be all borked up now. I use winamp+ml-ipod to manage my ipod and music as opposed to iTunes, but thankfully that is a minor gripe. I'll live. :)
by LonerVamp 09.18.06 at 1:30 PM in /linux -
I've used Linux in the past, Red Hat, SuSE, Slackware, Knoppix, and various other livecds, but have never been able to make it a regular box that I use 95% of the time. Hopefully this will change.
But first, I want to just out and say it: Linux is not ready for prime time. Not even Ubuntu. Unfortunately, Windows is far easier to wield and get things done on. It might be less secure, but this is the classic usability vs security relationship. Thankfully, Ubuntu is not just for the uber-geek elite anymore, and can be adopted by hardcore geeks and even casual geeks, but it is not ready for the average consumer or user, and has a long way to go.
What better way to compare the two than by keeping score. Now, keep in mind Ubuntu is going to win in the end, as Linux will for me. I plan to stick with it and hammer away at it until I'm firmly on the "other side." It might be painful, but this is just part of learning and becoming a better geek (read: IT professional).
The install, as stated before, was amazingly fast compared to any other OS I've run. I literally thought I was still running the livecd portion of Ubuntu when I first rebooted (Ubuntu +1). However, the partition options leave a lot to be desired. While Windows is simple with partitions, Linux has always been arcane with them and knowing how many you need and how to carve them up is, in my opinion, the single biggest detractor for new users to try out Linux. Right from the start, it is complicated and difficult and unknown. Many people put it down right there without really giving it a true try. Ubuntu is an all or "know it yourself" install. Either it takes the whole disc or pre-made partition, or you have to know what you're doing. Sadly, I don't, and many people won't either (Windows +1).
So, last night I went about making sure I could do the typical things I want to do. I first updated Ubuntu, which, like Windows, prompted me with a nag screen saying there were updates. Nice! The updates were relatively quick for having 170+ updates, and of course required no reboot (Ubuntu +1).
Synaptic is really cool, and I'm happy with it. One bad point though, is that you're stuck with Ubuntu's packages and you need a little bit more knowledge to open up the universe and multiverse to more downloads. But, I always have liked having a central repository for many programs, all of which are free (Ubuntu +2, Windows +1 [how many people really catch the universe/multiverse updates without work?]). My biggest complaint about Synaptic, though, is how easy it is to do something and say, "omg, wtf did I just do?" I did this by selecting some packages and not paying close attention to the required packages or things that needed removal. After walking away to pop in a movie, I came back and hit "Apply," only to see Ubuntu quickly remove some things. I have no idea what they were, but I hope they were not important. I have learned, however, that I really should do one thing at a time, and scribble down what is added and removed, at least until I'm comfortable with this process.
sudo gedit /etc/apt/sources.list
add in: deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb http://us.archive.ubuntu.com/ubuntu/ dapper multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper multiverse
save, then: sudo apt-get update
And this is the second biggest issue people have with Linux, and myself: the installs. Windows has a huge boost here with automatic installers that take care of everything. You don't need to unzip things usually (and if you do, it's easy). You don't need to compile from source code. You don't need to hunt for packages that work with your OS flavor (Windows flavors don't run concurrently, there's really only one active one at any time now, not counting Server). You don't need to wonder what the executable is or how to run it, it appears automatically in your Start->Programs list. Ubuntu is not so helpful all the time. I installed about 10 different packages from kismet and airsnort to lxdoom and tcpdump. Over half the installed packages were installed, and then promptly hidden from me. They were not in the Application list nor did I find them in the filesystem. Granted, most of the ones now found seem to be command-line apps, but this is a huge hole for most casual users. "I installed lxdoom to play it, now it doesn't appear, what gives?" (Windows +1) Not only that, but at least Synaptic takes care of linked packages or things you need before something you want. Trying to track these down and align the planets just to install one program can be a huge headache in Linux. (Windows +1)
So, an OS that is going to be a "Windows killer" better do some basic things without fuss. Ubuntu's wireless works, Firefox is installed by default, Thunderbird is installed by default, but is not the default mail program and does require being added into the Application list (Windows Start->Programs list). I installed GAIM without problem and promptly got on my IMs without issue at all. (Ubuntu +1 Windows +1)
I then popped in a DVD. Totem, the default media player threw an arcane error. Ok, I didn't want Totem anyway. So I installed mplayer. It also threw an error, even more arcane than the first. I then installed Ogle and Xine, both of which also could not read my DVDs. Wow. I did some research and it turns out encrypted DVDs are just enough of a closed format that Ubuntu decided not to include the ability to play them out of the box, or even after installing new players. In fact, I couldn't find the libraries I needed in Synaptic. D'oh. I found libdvdread3 jus fine, but libdvdcss2 had to be downloaded from some guy's FTP in Sweden. (Windows +1)
use synaptic to get libdvdread3
install libdvdcss2: sudo /usr/share/doc/libdvdread3/examples/install-css.sh
Whoa, wait a minute here...what version did I just download? What command did I have to run to make it work? I have to download some weird library that may or may not be 2 years old from some guy's FTP site in Sweden? I did more searches and found more German and other foreign sites, none of which looked commercial. This is the kind of thing in Windows that we, as security people, work to avoid: downloading from sites that make us stop and get paranoid about. (Windows +1)
After putting in the new library, though, all the players could play my DVDs without problem (I think I like the Xine interface best, but it doesn't fill my whole screen, sadly...which may be a graphics driver issue, but with the player...). However, this sort of hassle and *need* to Google up and understand uber-geek Linuxspeak to get it to work is going to keep Ubuntu from being used by my parents and friends. (Windows +1)
So that is where I stand right now. I can do most of the things I want to do on a daily basis (email, web, IM, and accessing my external drives for media like music, and dvd playing [with effort]), but where Ubuntu makes up ground on Windows in the install and ease of deployment, it loses ground in the places Linux has always lost ground: packages, not doing the necessary things out of the box, and needing to put on the geek cap just to work around things. Does Windows necessarily do this better? Perhaps not, but at least 99% of the computer-using world is used to it.
The score appears to be about how I expect, with Windows leading at this point, because this is all the hard, preventative stuff from Linux and Ubuntu so far. Windows 8 Ubuntu 5.
by LonerVamp 09.22.06 at 9:18 AM in /linux - comments(0)
I've reformatted my new laptop harddrive, installed Windows, carved up the partitions to give Windows roughly 20GB, Ubuntu 30 GB, and the other 50GB for eventualy virtual machines.
I did this because originally Ubuntu just decided to take the whole disk, and I've had experience with Windows just not playing nice with Grub if it isn't loaded first. So now my system is in a moreorless state of completion to move forward again.
This also means I've spent a bit more time in Windows again, getting the new install configured up and things back to normal with email and such. Thankfully, since I build systems so much at work and home I've learned not to get fancy. Back in the day I worked with such things as WindowBlinds to make my Windows all fancy and neat and pretty and slick. But I quickly realized I don't want to spend a week redoing all that fancy crap every time I format.
Anyway, now that Windows is situated and my old drive is mounted in a USB enclosure fitted for laptop drives, I am now back into Ubuntu and moving forward with getting things installed and using it for more every day use. Next step this week sometime: get my email ported over from Thunderbird to...Thunderbird! Piece of cake!
by LonerVamp 10.10.06 at 9:04 AM in /linux - comments(0)
Screencapture in Linux can be tricky. Here are two resources to check out.
Wikipedia entry
vnc2swf
by LonerVamp 10.15.06 at 6:00 PM in /linux - comments(0)
I put my Ubuntu move on hold for a few weeks, but I'm back to it now. Having set up many Windows systems in the past, I know how important it can be to document the process, especially for something new like Ubuntu (hence some of my previous posts on this subject). I've taken to keeping a log of the apps installed, changes, and commands I run.
In migrating to the new system, I'm really happy when programs include easy-to-use exports and imports to transfer information from one system, or even OS, to another. Firefox allows me to export my bookmarks (which have swelled terribly!) and then import them into Ubuntu's firefox. Wahoo! Sadly, Thunderbird does not allow this with mail and mail settings. I can do this from one Windows box to another (just copy the profile folder), but have not yet figured out how to do this over on a Linux box. Ah well, it would only take a few hours to set everything up as I had it before anyway. This just shows how valuable remote services like Gmail and Yahoo are for less technical users. Lose your system or get a new one? Just log into webmail and you're back where you were before!
So, the migration is moving forward. The last task to (nearly) fully get away from booting Windows is to utilize wine and vmware. I searched for some information and stories on installing vmware workstation and found this amazing checklist for an Ubuntu install. Much like so much coding, why reinvent the wheel and make my own when I can just borrow chunks of this guy's checklist? He even has most of the steps I've already gone through, and it looks current! Definitely an inspiration and a great help in making sure I have what I want.
Hopefully by the end of the week I will have a vm set up for Windows which I can pop open when I need to quickly use some Windows program without booting over to my Windows install. In addition, I'd like to get one or two things to work in Wine as well, but the VM is an easier and quicker step for me right now.
As far as getting more things to work, I've become very happy with mplayer as opposed to Totem (the default Ubuntu media player). Totem did not like Divx files (been downloading HOPE presentations) but mplayer rolled right with the punches and played them back just fine.
by LonerVamp 11.07.06 at 10:33 AM in /linux - comments(0)
So, I have a VM of Windows XP running on my Ubuntu laptop now, so that I can do those few things that I need Windows for. Sadly, Windows and the Activation nag don't seem to be on the same page. No matter how many days I wait, it nags me that I have 30 days of activation left, but I am unable to activate my Windows either manually by inputting the key found on my laptop case. Well, as long as it stays perpetually on 30 days, that is at least tolerable, but I need to research why this happens and if I can fix it or redo the VM creation to alleviate the problem. I remember a popup warning about it when creating the VM, and I may have done something wrong.
Of note, the only thing I do on a daily basis that has not been moved over to Linux is my email from Thunderbird. I guess I could take some time and just move over, but it is all the older email that I need to wade through and catch up on first. I'll maybe just end up losing all that mailing list email I've built up...
Watching HOPE 6 presentations this weekend gave me more excuse to shore up Ubuntu's media-playing issues, including mp3 support. Very happy with XMMS and MPlayer.
by LonerVamp 11.13.06 at 11:35 AM in /linux - comments(0)
I took the time needed to get Thunderbird all set up with my email on my Linux install. This was very easy since I use Thunderbird on Windows and was already quite familiar with the app. Good times!
I still need to get my hands on a legit or properly cracked (and still working) version of Windows XP Pro so that I can finish my VM install. I really want this so that I can run a few random little things that I need to run in Windows (like Ventrilo).
Next on my list is to iron out mounting my external hard drive with write access. The drive is saved in NTFS, a Windows standard. While there are tools and ways for Linux to write to NTFS properly, there is still (after numerous years) disclaimers saying that the whole drive may still get hosed up. So I need to dig out another drive and perform a full backup of this external drive. I need to do this anyway as it has been a while since I backed it up. Either way, this shouldn't be a huge deal. Copy data over, install the NTFS tools on Ubuntu, mount the drive, test out write/delete/move functions. Done!
I also started playing with the new tools that Linux opens up to me. I installed kismet and played with it a bit, far deeper than I've ever played with it before on livecds like BackTrack. I even got to figure out how to edit shortcuts, the Gnome desktop layout, and application menus. More good times!
by LonerVamp 11.20.06 at 11:36 AM in /linux - comments(0)
My move to Linux as my main computer system is about 80% done, I think. That figure does not include things that don't run in Linux, like Ventrilo, some games, and Soulseek (p2p network). But the rest is coming along nicely.
I can now rip new cds using Grip. I have installed XChat for some IRC socializing (I had no idea there was a Windows version of XChat...yeesh). I found that GAIM will support GoogleTalk (Jabber) although it won't do voice chat. And I've shored up some problems with Totem and Mplayer not being able to play some media files like WMV files.
Basically just ironing out lots of little issues and problems this weekend. My external (NTFS) drive still is a bit picky. Sometimes I can write/delete files, but sometimes some files just won't delete. I'm tempted to just run a backup of the data, format the drive in FAT32, and be done with it. I know I'm not really utilizing the powers of NTFS on it anyway, even in Windows. A thought to toss around...in the meantime, I'm becoming more familiar with mount/umount.
by LonerVamp 11.26.06 at 12:00 PM in /linux - comments(0)
Going on about 5 months using Ubuntu as my primary laptop and things are still relatively good; good enough to stick with it. I do have a companion laptop with Windows XP that I use to stay sharp on XP, try out new stuff, and do the few things that Linux won't do yet (particularly run my favorite P2P program, SoulSeek).
However, there are some growing concerns, particularly in how robust Linux can be as a desktop machine.
Ubuntu is sluggish. I've long noticed this, but only lately is it really grinding on me. Ubuntu with Gnome is not nearly as crisp to respond as my tried and true Windows machines. Nautilus is even slower and clunky and will sometimes hang when transferring 70+ files over an SMB connection on my network. Firefox 1.5.x (the kind Ubuntu 6.06 supports) is crashing or just having problems loading some content. Firefox on Ubuntu is far slower than Firefox on Windows, even on worse hardware, both on load and in serving content.
I'm going to stick with Linux because I really want to learn it, but I will say I don't think it is yet ready to displace other OSs on the typical desktop. It still can't do many things out of the box and it just is not as swift as Windows (assuming Windows is relatively free of spyware/adware). Linux has a long history of being appropriate for geeks, but Windows has a long history of meeting the needs of a vast majority of common users...and that's where the desktop market is.
I am going to see if I can get Kubuntu 6.10 up and running on another box and try it out before I think about replacing my Ubuntu 6.06 install. Perhaps KDE will be more to my liking and I'm totally willing to check it out.
by LonerVamp 02.06.07 at 9:46 AM in /linux - comments(1)
Yeah, I know, back to basics with Ubuntu. This took me longer than it ever should have, so I'm just posting my travails here. I wanted to make my Ubuntu server essentially headless where I don't have a keyboard, mouse, or monitor hooked up to it. Obviously this means remote desktop capabilities.
Sadly, the obvious and most often-used tools to accomplish this either require me to remote logon with my Ubuntu laptop (yuck!) or require a session to already be logged on the server locally (yuck!). Well, I want to be able to remote in, even at the logon window after a reboot! Here are my steps.
sudo apt-get x11vnc vnc-common
sudo x11vnc -storepassword password /etc/x11vnc.pass
sudo gedit /etc/X11/gdm/Init/Default
add this at the bottom just above exit 0:
/usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -o /tmp/x11vnc.log -forever -bg -rfbport 5900
sudo gedit /etc/X11/gdm/gdm.conf
change #KillInitClients=true to KillInitClients=false
reboot
I'll probably end up changing this all up once I decide to wrap this inside SSH, but since this will always be local (unless I VPN in remotely), I'm not as concerned about this setup. I might just tunnel it through SSH just to make sure I can do so with this setup.
by LonerVamp 04.18.07 at 10:24 PM in /linux - comments(2)
I dig somafm, particularly the Groove Salad station. Sometimes I get into a nice chilled state of mind at night and would love to fall asleep to some cool grooves, but don't want XMMS (my mp3 player) to run all night long. Well, I can do this easily in a terminal shell by first finding the pid of XMMS and then using the sleep command. Elegance in simplicity.
michael@orion:~$ ps ax | grep xmms
29540 ? SLl 0:20 /usr/bin/xmms /tmp/groovesalad.pls
30511 pts/0 R+ 0:00 grep xmms
michael@orion:~$ sleep 1200; kill 29540
by LonerVamp 04.19.07 at 11:30 PM in /linux - comments(1)
Tonight I finally got around to installing vmware server on my new vmware box. I used a couple sites as my guides. Ever since starting Linux, I've learned to keep "journals" about what I've installed and the voodoo needed to get some things working for future reference. I'm getting better about putting my notes down into a more polished form early, but I still might get one or two things wrong here. I'll try to update as needed, but I suspect eventually these notes will just get ported over to the wiki.
I needed to install a few dependencies first since this is a fresh Ubuntu 6.10 install.
sudo apt-get install xinetd
sudo apt-get install linux-headers-`uname -r` build-essential
this folder will be used to hold the vms:
mkdir /var/vm
Download both files (server and management user interface) into a temp folder get a registration key while on the site. This is free and doesn't require any valid information, not even email. The key will appear after submitting the form (the sales teams must love that!).
tar xvfz VMware-server-*.tar.gz
cd vmware-server-distrib
sudo ./vmware-install.pl
I answer /var/vm as the location for virtual machines. I also answer "no" for NAT or host-only networking (leaving me with bridged mode) as I really just want my VMs to be grabbing an IP off my network and have full access out to the Internet (at least on this machine).
Next is the MUI.
tar xvfz VMware-mui-*.tar.gz
cd vmware-mui-distrib
sudon ./vmware-install.pl
All defaults for the MUI. This should fail to start the httpd server at the end and needs a patch.
cd /tmp
wget http://users.piuha.net/martti/comp/ubuntu/httpd.vmware.diff
cd /
sudo patch -b -p0 < /tmp/httpd.vmware.diff
sudo /etc/init.d/httpd.vmware start
This is the location once it has started: https://localhost:8333.
To create VM, you will need to use the console (not the MUI) by heading over to Applications->System Tools->VMWare Server Console in the kicker.
by LonerVamp 05.14.07 at 9:18 PM in /linux - comments(2)
If you do much work using Ubuntu and multiple computers, you may have noticed when using vncviewer to remotely connect to a system with a higher screen resolution, you'll get these annoying black scrollbars. These bars seem to only scroll in one direction and then never scroll again, right?
Well, wrong. Turns out these bars do work, you just have to right-click to move the bars the other direction. Middle mouse button will work them in either direction. That's just weird and I'd rather not deal with it.
There is another solution. On your client system, go to your repositories or otherwise apt-get xvnc4viewer. This will fix those dang scrollbars. As a bonus, this seems to replace any vncviewer apps you have on the Ubuntu client. If you type vncviewer, you get xvnc4viewer. If you click Applications->Internet->Terminal Server Client and attempt a VNC connection here, you also get xvnc4server. Nice!
by LonerVamp 05.15.07 at 10:15 PM in /linux - comments(0)
Kevin van Zonneveld has posted some notes on using crontab. I don't use crontab enough, which means I always have to look up the time settings. However, that is easily done via Google. What I really liked about Kevin's notes dealt with handling the errors and pointing them to a file rather than the user's mailbox. I can see reasons for doing it either way.
by LonerVamp 08.13.07 at 9:40 AM in /linux - comments(5)
I don't think I posted it, so I thought I would jot down installing an SSH server on Ubuntu 7.04 (Feisty).
sudo apt-get install ssh
gksudo gedit /etc/ssh/sshd_config
Change the PermitRootLogon to no and change port to desired port number. Add a new line at the bottom, "AllowUsers username" where username is your username you want to allow. You can use "DenyUsers username," but once the AllowUsers is set, all others are denied anyway.
Next, I want to add a little brute-force protection using pam-abl. These instructions may not be current, but they worked out for me. Add "deb http://ubuntu.tolero.org/ edgy main" to your/etc/apt/sources.lists file. Remember to open it as root so you can save it. And yes, I am using edgy instead of feisty in this line.
sudo aptitude update
sudo aptitude upgrade
sudo aptitude install libpam-abl
sudo /etc/init.d/ssh restart
Run "sudo pam_abl" to list the current blacklist, and use --help for more features or manual blocking. Failed logins are collected in /var/lib/abl. SSH logs are written to /var/log/auth.log, however it might be useful to increase the logging level and location. Change "LogLevel INFO" to "LogLevel VERBOSE" to get more out of the logging.
Further hardening can be done. The files /etc/hosts.allow and /etc/hosts.deny will allow or deny the listed users respectively. These lines will allow two IP address ranges to connect but deny all others.
# /etc/hosts.allow
sshd: 10.10.10.0/255.255.255.0
sshd: 192.168.1.0/255.255.255.0
# /etc/hosts.deny
sshd: ALL
Referenced Tolero.org for the pam-abl install. I also note an Ubuntu help file.
by LonerVamp 08.20.07 at 11:06 PM in /linux - comments(0)
This image of the Linux file system is extremely cool! I think I'll print a few copies out and put them next to my computers. Layouts are one thing, but to make a useful one with some instruction on what some of the more esoteric section are is excellent!
by michael 09.25.07 at 4:57 PM in /linux - comments(0)
|