WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Script to create firewall/router initrd.  (Read 3585 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Script to create firewall/router initrd.
« on: June 16, 2011, 05:55:05 PM »
This script will create an initrd for firewall/router appliance that expects 2 standard ethernet devices, one facing the DSL router going to the internet and one facing the internal network.   It uses udhcp to assign internal addresses to machines on the internal network.  The creation script prompts if you want to install dansguardian (filtering) and dropbear (ssh server).  if installed, dansguardian is pre setup and initialized on boot.   To be able to log into the ssh server from a different machine, you will need to set a password on the router and back up /etc/shadow.  Edit the variables at the top of the script if you have different device names or need different net settings than the default.

The resulting initrd can be found in /tmp.  Place if in the /tce directory or in a remaster, and if loaded during boot it should boot up and just work with the preconfigured settings.
« Last Edit: August 18, 2012, 07:53:15 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Script to create firewall/router initrd.
« Reply #1 on: August 18, 2012, 07:55:57 PM »
Updated the script to work with current and be more portable.  It now makes a custom tce directory to get started with on a router, the tce dir is created in the current directory named firewall-tcedir and contains an initial mydata.tgz.  Just copy that tcedir to where you want to get started.  This should be more flexible than the original initrd.

Be sure to edit the variables at the beginning of the script as needed, and to edit the files in question when asked during the running of the script.
« Last Edit: August 18, 2012, 08:58:57 PM by Jason W »