Save iptables on Shutdown and Restart, and Restore on Boot

Tuesday, October 6th, 2015

Save iptables Rules on Shutdown, Restore on Boot

When your server shutsdown (halts), reboots, or enters runlevel 1, your iptables configuration is automatically wiped and reset.  Packages such as iptables-persistent supposedly help with this problem, but unless you save your rules manually, the rules are never saved automatically when the system reboots. 

I've wanted to truly persist my iptables, so I decided to change their package to always save the iptables rules when the system reboots, halts, or enters runlevel 1 automatically.  The rules are then restored when the system boots to runlevels 2-5.  This means that your iptables configuration will persist forever.  This may not be desired, but if I ban an IP address permanently, I always want it to be banned.

If you'd like to use this modified version of iptables-persistent so that your rules are automatically saved on shutdown, you can install it by running the below commands:

sudo apt-get remove iptables-persistent
sudo dpkg -r iptables-persistent
wget http://dinofly.com/files/linux/iptables-persistent_0.5.8_all.deb
sudo dpkg --install iptables-persistent_0.5.8_all.deb

Use at your own risk.  If you do something stupid, it will persist until you can clear it!

The above package was tested in Ubuntu 12.04 x86, Ubuntu 12.04 x64, Ubuntu 14.04 x86, Ubuntu 14.04 x64, and Ubuntu 15.04 x64.  Should work on other debian operating systems as well.

My Favorite Ubuntu Distribution and Software

Thursday, March 29th, 2012

My Favorite Ubuntu Distribution and Software

I run my own personal dedicated server, and I choose Ubuntu to power my server.  But, I don't just use any version of Ubuntu.  I use Ylmf OS, a Windows XP GUI interface Ubuntu 10.04 distribution.  Yes, the Chinese wrote it, but we can all trust the Chinese, right?

Why Do I Use Ylmf OS

I used to be a n00b to Linux a few years back, and I wanted something that looked like Windows XP.  You should be able to tell by now that I love Windows XP and Windows XP x64 with a passion.  Everything just works unlike in Windows 7 and Windows Vista.

List of Best Open Source Software for Ubuntu

  • EHCP Hosting Control Panel – Automatically configures all services you'd need for a dedicated apache2 web server with VSFTPD and includes a fully functional advanced GUI control panel for easy user management, MySQL functionality, subdomains, addon domains, easy install scripts, everything you'd find in CPanel X3, and more!
  • Open Game Panel – An open source game server management panel software.  Allows you and your customers the ability to start, stop, restart, and modify config files for gaming servers on the fly.
  • Mumble Client and Server – Great open source voice over IP client that resembles Teamspeak and has greater functionality.  Install it using:
    sudo apt-get install mumble-server
  • FreeNX – An open source remote SSH GUI login which allows you to remote desktop with encryption without having to learn those nasty ssh commands in the terminal (yes they're simple, but I like the GUI better thanks).

More to come as I think of them.