The first thing you need to do is find out the IP address of the banned user.
This will list the current rules that exist in iptables.
You’ll see one listed as fail2ban-ssh, likely with an ip address.
To clear it, issue the follow command.
iptables -D fail2ban-ssh -s <ip_address_to_be_set_free> -j DROP
I have used the code above with Debian wheezy successfully.
I visited Mighty Fine and Fuddruckers this month for dinner. This is a comparison between the two burger chains, one being an international company started in San Antonio, and the other a relatively new player in Austin, Texas. I judge each joint on five (5) criteria, with each criteria allocated 10 points for a possible perfect score of 50. 1) Price based on a 1/2lb hamburger, 2) Preparation, 3) How the burger is dressed, 4) The side of fries, and 5) Establishment Ambiance and Decor.
Fuddruckers 1/2lb Burger w/Cheese: $5.99
Mighty Fine 1/2lb Burger w/Cheese: $6.19
10 points to Fuddruckers for winning on price, 5 points consolation to Mighty Fine for being competitive on price.
Fuddruckers prepares your burger to order. You want your burger “medium rare” – they’ll fix it medium rare for you. They also use a charbroiler to cook your burger. The burger is measured to 1/2lb by machine and formed in a mold to guarantee a very nice edge, and an evenly thick burger. It is served hot and moist with a lightly buttered toasted bun.
Mighty Fine prepares your burger for you – no customization allowed. It will be either very welll done or well done. They use a flat griddle cooktop – no charbroiling here. You’ll get it cooked on the stove, covered to melt your cheese. The pattie is hand-formed, uneven, and irregular in size and form. It’s claim to fame is that it’s hand made.
Points to Fuddruckers for a better burger. 10
Points to Mighty Fine for having a burger: 5
Mighty Fine will ask you if you want “Red, Yeller, or White” and what would you like on your burger. They’ll customize and ask you what you want to order, and can dress your burger with additional “local” (off-menu) items for an additional charge. You have to ask.
Fuddruckers has all of the dressings, less the cheese that was melted on your pattie, at a large salad bar area. You can grab as much or as little as you want – with shredded or whole lettuce, and “red, yeller, or white” to the side. Fuddruckers will also add additional items to your pattie for an additional charge.
Both joints get a point deducted for using white onions on the condiment selection. Everybody knows that red onions are salad onions (intended to be eaten raw) and white onions are for sauteed dishes, seasoning, or cooking (ie: onion rings).
Points to Fuddruckers for allowing the customer to decide minus 1 point: 9
Points to Mighty Fine for being dictators of burger dressing, minut 1 point: 4
Side order of Fries
Mighty Fine has thin crinkle-cut french fries freshly made from potatoes grown in Oregon’s Malheur County (near Idaho). They are plentiful – but they are not cooked twice. They can be greasy. Some are overly cooked and others not cooked through. I didn’t care for the fries at Mighty Fine Burgers. Seasoning was not added to the fries.
Fuddruckers also makes their fries from Malheur County potatoes, also cutting them fresh on-site. Fuddruckers, however, serves real french fries – Steak Fries. Cut big and wide – these fries were cooked perfectly, not too greasy, plentiful, and crunchy – the sign of being cooked twice. Nice and big – they were perfect for dipping into a Mayonnaise and Ketchup mixture. I loved the fries at Fuddruckers.
Points to Fuddruckers for better french fries: 10
Points to Mighty Fine for having french fries on the menu: 5
Mighty Fine is clean and open, with large long tables that would be right at home in a Texas BBQ joint. No plates – just a bag, with your burgers and fix’ns inside – use the bag or the wrapper for ketchup dipping. Talk to the family next to you as your sharing the same table. Apologize to the lady sitting behind you in the uncomfortable folding chair. The odd thing is a one-way see through glass in the men’s bathroom. Nothing like standing up and taking a whizz – and just on the other side of the glass is a family eating lunch. Kinda disturbing – but in a funny way. “OMG, I can’t believe I just whizzed and you guys didn’t see me.” Also a nice touch are the souvenir plastic cups that you can take home. They are the same type used by the Oasis, Rudy’s and a couple of other local Austin eateries – good marketing, and handy for using as daily cheap glasses for large gathering at home. The music being played is varied – but of the soft-rock variety. Lighting is bright, can be glaring – trying to get the “clean” feel of clean metal or picnic tables outside.
Fuddruckers has traditional seating and is well lit, has upscale tables for four (that can be moved together if needed), large booths, and larger rounded booths for larger groups. Lighting and colors are subtle. There is no outside seating. The music is popular rock music from various eras.
This is a toss-up tie – because there are advantages to both types of seating based upon your “mood” at the time of your visit. Families will enjoy the open atmosphere at Mighty Fine – because the expectation bar is set so low. Couples will enjoy Fuddruckers for a more intimate and conversational friendly atmosphere.
Points to Fuddruckers: 10
Points to Mighty Fine: 10
Fuddruckers was the clear winner in this battle of the burger beasts. Fuddruckers serves a burger that is consistently good, well prepared (to order) while leaving the final dressing of the burger up to the customer. Mighty Fine got points for showing up – but Mighty Fine is more of a repurposed BBQ joint than a hamburger joint. If Mighty Fine served BBQ brisket and Elgin Sausage instead of Hamburgers – then it might make sense. But – that’s where the owners and operators of Mighty Fine come from.
For the money you spend, a Fuddruckers burger is much better than a Mighty Fine burger.
And it’s more affordable too! For $2 more, you can get a Buffalo, Venison, Elk, Salmon, Turkey or Ostritch burger instead of beef. How cool is that?
Mighty Fine: 29
What is a crontab?
In Linux, Cron is a daemon/service that executes shell commands periodically on a given schedule. Cron is driven by a crontab, a configuration file that holds details of what commands are to be run along with a timetable of when to run them.
Creating a crontab file
You can create a crontab file by entering the following terminal command:
Entering the above command will open a terminal editor with a new blank file, or it will open an existing crontab if you already have one. You can now enter the commands to be executed, see syntax below, before saving the file and exiting the editor. As long as your entries were entered correctly your commands should now be executed at the times/dates you specified. You can see a list of active entries by entering the following terminal command:
A crontab file has six fields for specifying minute, hour, day of month, month, day of week and the command to be run at that interval. See below:
Writing a crontab file can be a somewhat confusing for first time users, therefore I have listed below some crontab examples:
* * * * * <command> #Runs every minute
30 * * * * <command> #Runs at 30 minutes past the hour
45 6 * * * <command> #Runs at 6:45 am every day
45 18 * * * <command> #Runs at 6:45 pm every day
00 1 * * 0 <command> #Runs at 1:00 am every Sunday
00 1 * * 7 <command> #Runs at 1:00 am every Sunday
00 1 * * Sun <command> #Runs at 1:00 am every Sunday
30 8 1 * * <command> #Runs at 8:30 am on the first day of every month
00 0-23/2 02 07 * <command> #Runs every other hour on the 2nd of July
As well as the above there are also special strings that can be used:
@reboot <command> #Runs at boot
@yearly <command> #Runs once a year [0 0 1 1 *]
@annually <command> #Runs once a year [0 0 1 1 *]
@monthly <command> #Runs once a month [0 0 1 * *]
@weekly <command> #Runs once a week [0 0 * * 0]
@daily <command> #Runs once a day [0 0 * * *]
@midnight <command> #Runs once a day [0 0 * * *]
@hourly <command> #Runs once an hour [0 * * * *]
A double-ampersand “
&&” can be used to run multiple commands consecutively. The following example would run
command_01 and then
command_02 once a day:
@daily <command_01> && <command_02>
Disabling email notifications
By default a cron job will send an email to the user account executing the cronjob. If this is not needed put the following command at the end of the cron job line:
Specifying a crontab file to use
As mentioned at the top of this post, you can create a new crontab file with the “
crontab -e” command. However, you may already have a crontab file, if you do you can set it to be used with the following command:
crontab -u <username> <crontab file>
Therefore the following command…
crontab -u tux ~/crontab
…would set Tux’s crontab file to that of the file named “crontab” residing in Tux’s home directory.
Removing a crontab file
To remove your crontab file simply enter the following terminal command:
Refer to the man page for further information about crontab. Enter the terminal command:
Some external links for your browsing pleasure:
Problem: Mars and Venus and NFS
You have two (or more) machines and you want to mount a drives with NFS from one machine to the other machine. For our purposes, the first machine (sharing) is Mars and the second (mounting the share) is Venus. So, you want to share an NFS mount from Mars with Venus. Mars is running OSX Snow Leopard or later, and Venus is running Mountain Lion. Mountain Lion no longer has the “Mount NFS Share” GUI utility in the Disk Utility.
Apple took it upon themselves to remove the NFS share utility from the disk utility for various reasons. I believe that they removed it to protect their customers, because NFS is a network file sharing protocol that is insecure if it’s exposed directly on the internet. It’s perfectly fine, however, to run NFS behind a firewall on your home desktop computers. I wouldn’t have any NFS exports on a laptop, since a laptop travels. So, why use NFS? Well, the advantage is that you don’t actually have to enable sharing in the System Preferences, you just need to modify one file.
As always, make sure that your Time Machine has a good backup. And always make backup files of any existing system files before you change them.
How to share the NFS mount from Mars
I want to share a volume from Mars, so I need to edit the file “/etc/exports” file on the Mars machine.
Mars:~ jeffreyspencer$ sudo nano /etc/exports
Add a line in the exports file to mount the volume and/or directory that you want to export on the network.
/Volumes/Mason -mapall=jeffreyspencer:staff 192.168.1.150 192.168.1.165
Mason is the volume which is being shared via NFS from Mars. You can specify the entire volume, or a path to a specific directory. I’m sharing the whole flipping thing – because that’s how I roll. I am mapping all users to my user account since I’m on a trusted network and I’m the only user. I am sharing the NFS mount with two machines, one located at +150 and the other at +165. Save the file.
Now that the exports file is saved, turn on the NFS daemon.
Mars:~ jeffreyspencer$ sudo nfsd start
How to mount Mars NFS shares on Venus
Working on Venus now, open a finder window, and then click on the top bar “go” menu, and then click “Connect to server.”
You are going to mount an NFS drive from Mars, which has exported /Volumes/Mason location in the exports file. After you enter the location, save the entry (press the plus sign) and then press “connect” to mount the NFS drive. Now, browse to the current computer “Venus” in the finder and . . .
(American comfortable with their bastardized heritage, myself included, might use the phonetic “Wala”)
Your NFS drive is now mounted.
Machines are stupid. Your job, therefore, is to be smarter than a machine.
You can read about the AutoFS system contained in OSX and the different methods used to mount drives using Apple’s Technical White Paper on the subject.
The Boot0 Issue:
Upon successful installation, boot from hard drive results in a boot0 error:
Loading Operating System …
The Actual Problem:
Due to the storage size of large drive, manufacturers had to change the default block size from 512 bytes to 4,096 bytes. The large drives are known as “Advanced Format” or 4K drives. Initially this was only seen on drives larger than 1 TB, but this change will be standardized and on all drives to lower manufacturing costs. Windows and Linux resolved their boot loaders quickly, but OSX was a little slow to catch-up because Apple didn’t ship systems with drives larger than 1TB until a couple of years ago. As part of this change there is an issue with OS X writing the boot code to the MBR sector. Thankfully, you can write to the MBR manually (Yay!) in order for the OS to boot. So, yes – you can purchase and replace that old Apple 1TB drive with a nice shiny 2TB drive.
Be mindful – your mileage may vary. If you’re not a geek or a genius – you should just accept Apple’s configuration and/or buy a new machine.
1. Install Mountain Lion from a USB drive. (if you don’t have one, google it)
2. Boot new installation using the same USB drive.
3. Run install scripts as normal – network, sound, etc.
4. Reboot system back into Mountain Lion installer from the USB.
5. At the second prompt (after welcome), run the Disk Utility and unmount the Mountain Lion drive you just installed. The drive has to be “unmounted” and not in use when you write to the MBR.
6. Launch Terminal from the utilities menu and execute the following command:
dd if=/usr/standalone/i386/boot1h of=/dev/disk0s2
7. Exit Terminal
8. Reboot Normally
9. Laugh at the Sky
NOTE: The above instructions are based on OS X being installed to a hard drive connected to SATA port 0. If you are using a different port you will need to get the drive device name from Disk Utility by selecting the volume and clicking Info. This post is intended as a personal note for my own use (had to do this on my box), but you may find it useful. You can find other guides on the internet that are similar if you don’t like this one.