Category: Network

  • Custom firmware for Asus RT-AC66U

    Merlin has a custom Asuswrt firmware for the RT-AC66U router which can be found at its new home at http://www.mediafire.com/asuswrt-merlin/#

    With this firmware Merlin adds some needed feature that Asus lefted out see below.

    Using IPv6 can be a pain without a firewall between you and the world. This is one of the reasons I like Merlin’s version of the firmware,
    You can create a file /jffs/scripts/firewall-start on the router to run a custom firewall rules at start up.

    Here’s an example of what that file would look like for IPv6 6in4 tunnel with ip6tables:

    ip6tables -A INPUT -j DROP
    ip6tables -I FORWARD 2 -m state --state RELATED,ESTABLISHED -j ACCEPT

    # Allowed inbound rules here, such as this one:
    ip6tables -I FORWARD 2 -p tcp -m state --state NEW -i v6in4 --dport 22-j ACCEPT

    ip6tables -A FORWARD -i v6in4 -o br0 -p all -j DROP
    ip6tables -A FORWARD -i br0 -o any -p all -j ACCEPT
    ip6tables -A FORWARD -i br0 -o v6in4 -p all -j ACCEPT
    ip6tables -A FORWARD -i any -o br0 -p all -j ACCEPT
    ip6tables -A FORWARD -j DROP

     

    Here is a list of features that Asuswrt-merlin brings over the original firmware:
    System:
       – Based on the 3.0.0.4.246 source release from Asus
       – Various bugfixes (like the crash on VPN/NAT Loopback access of LAN devices)
       – Persistent JFFS partition
       – User scripts that run on specific events
       – Cron jobs
       – Customized config files for router services
       – LED control – put your Dark Knight in Stealth Mode by turning off all LEDs
    Disk sharing:
       – Act as a Master Browser
       – Act as a WINS server
       – Optionally use shorter share names (folder name only)
       – Disk spindown after user-configurable inactivity timeout
    Networking:
       – WakeOnLan web interface (with user-entered preset targets)
       – SSHD
       – Allows tweaking TCP/UDP connection tracking timeouts
       – CIFS client support (for mounting remote SMB share on the router)
       – Layer7 iptables matching
       – User-defined options for WAN DHCP queries (required by some ISPs)
       – Improved NAT loopback (based on code from phuzi0n from the DD-WRT forums)
       – Dual WAN support (both failover and load
         balancing supported) (EXPERIMENTAL) (RT-N66U, RT-AC66U)
       – OpenVPN client and server, based on code originally written by
         Keith Moyer for Tomato and reused with his permission. (RT-N66U, RT-AC66U)
       – Option to control Spanning-Tree Protocol support.
    Web interface:
       – Clicking on the MAC address of an unidentified client will do a lookup in
         the OUI database (ported from DD-WRT).
       – Optionally save traffic stats to disk (USB or JFFS partition)
       – Display monthly traffic reports
       – Display active/tracked network connections
       – Name field on the DHCP reservation list and Wireless ACL list
       – System info summary page
       – Wireless client IP, hostname, rate and rssi on the Wireless Log page
       – Wifi icon reports the state of both radios
    Thank you Merlin for your hard work in creating this firmware.
  • Windows 7 as a Samba File Server for Linux machines

    If you get the this error message “mount error(12): Cannot allocate memory” while trying to mount a Windows SMB to a linux box.

    You need to configure Windows to act as a file server and it will allocate the resources needed.

    Change the registry key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory ManagementLargeSystemCache  to ‘1′

    and Change HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParametersSize  to ‘3′

    once you have done that do a reboot and try mounting the Samba drive again.

     

  • VMWare Workstation 8 Server

    Recently I have started using VMWare Workstation 8, this is really cool and seem to function better than VirtualBox.
    If you setup a virtual machine and set it to be shared, you can make it boot up with the Windows OS, hence this could be a headless sever hosting a Linux OS.
    You will need to log in as the Administrator to set permission to allow your own user account to use the shared VMware server. Once you have done that you can make any virtual machine boot up as a shared virtual machine without having to be logged in to Windows.

  • Running a Ubuntu server on VirtualBox

    I created a virtual Ubuntu server on my Windows HTPC box using VirtualBox and VBoxVmService. This is a great setup as I can have a HTPC that’s always on with a Ubuntu server running on top.

    The Zbox is very energy efficient, quiet and small. This uses the AMD APU chip which is a all-in-one CPU/GPU combo.

    My setup is:

    • Zotac Zbox AD02
    • 8GB DDR3
    • 500GB WD HDD 7200k rpm
    • Windows 7 ultimate

    Installation was easy, I just installed VirtualBox, create a VM using the ISO from Ubuntu (make sure you install/enable SSH or NoMachine for remote access to the headless server), and then setup the VM to run as a service with VBoxVmService.

     

    http://vboxvmservice.sourceforge.net/

    https://www.virtualbox.org/

  • Nagios

    I Nagios is a wonderful tool to monitor your network devices.

     

    Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.

    Designed with scalability and flexibility in mind, Nagios gives you the peace of mind that comes from knowing your organization’s business processes won’t be affected by unknown outages.

    Nagios is a powerful tool that provides you with instant awareness of your organization’s mission-critical IT infrastructure. Nagios allows you to detect and repair problems and mitigate future issues before they affect end-users and customers.

  • Latest Toastman Tomato Firmware

    The latest version of Toastman Tomato Firmware is really nice (i’m using 1.28.7500.4).

    You can now monitor IP Traffic by IP, so you can find out if you have a rouge device on your network that’s sucking up all your bandwidth or data usage.

    Also support for IPv6 is great.

    Thank you Toastman for keeping the firmware updated!

    http://www.4shared.com/dir/v1BuINP3/Toastman_Builds.html

  • AirPrint and Ubuntu 11.10

    In Ubuntu 11.10, setting up AirPrint is easy.

    1. Have a Standard install of Ubuntu Desktop 11.10.
    2. Go into the CUPS interface and make sure “Share published printers connected to this system” is enabled on the server settings.
    3. On the Printer Properties, make sure the Shared checkbox is check on the Policies tab.
    4. If you have a firewall running, make sure you allow the needed ports (one of the is port 631).
    5. Restart CUPS “/etc/init.d/cups restart” or reboot the computer
    6. Make sure you iPhone/iPad is on the same network
    7. On your iPhone/iPad, go into Safari, print, and search for printers. Your new printer should be in there.

  • Export settings on a TomatoUSB router

    I copied this from Toastman:

    Flashing a new Toastman firmware version over an older one usually won’t erase your old config. However, try this method:

    1) If you paste “nvram export –set” into the “Tools/System command execution box, it will give you the file onscreen, these lines can then be pasted into another router.

    2) You could also use a small script to send it to a PC cifs share using the Scheduler e.g. “nvram export –set >/cifs1/routerconfig.txt”

  • Converting a SSL certificate from CRT format to PEM

    Some Linux applications (e.g. webmin and dovecot) require pem certificate files, to do this we use OpenSSL to convert them to pem.

    Step 1: openssl x509 -in ssl.crt -out ssl.der -outform DER
    Step 2: openssl x509 -in ssl.der -inform DER -out ssl.pem -outform PEM

  • AirPrint and Ubuntu

    This is what i did for my Canon MX850 to get AirPrint working on my Ubuntu system.

    1. Have a Standard install of Ubuntu Desktop.
    2. Go into the CUPS interface and make sure “Share published printers connected to this system” is enabled on the server settings.

    3. Install avahi-daemon and make sure it is running.

    4. Install avahi-discover and run it from a terminal. Click the printer you wish to duplicate. You should get something like:

    [code]
    Service Type: _ipp._tcp
    Service Name: Canon MX850 @ Saturn
    Domain Name: local
    Interface: eth0 IPv4
    Address: Saturn.local/10.0.0.4:30466
    TXT Binary = T
    TXT adminurl = http://Saturn:631/printers/Canon-MX850
    TXT Duplex = T
    TXT Copies = F
    TXT Collate = F
    TXT Sort = F
    TXT priority = 0
    TXT Fax = F
    TXT rp = printers/Canon-MX850
    TXT ty = Canon PIXMA iP5300 – CUPS+Gutenprint v5.2.6 Simplified
    TXT Punch = F
    TXT note = Saturn
    TXT printer-state = 3
    TXT txtvers = 1
    TXT Transparent = T
    TXT product = (Canon PIXMA iP5300)
    TXT qtotal = 1
    TXT Bind = F
    TXT printer-type = 0xB01E
    TXT Scan = F
    TXT Color = T
    TXT pdl = application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png
    TXT Staple = F
    [/code]

    5. Create file name /etc/avahi/services/mx850.service.

    6. Create an XML file similar to the example below, using the data above as the values.

    [code]

    < ?xml version="1.0" standalone=’no’?>
    < !DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service -group>
    <name replace-wildcards="yes">AirPrint MX850 @ %h</name>
    </service><service>
    <type>_ipp._tcp</type>
    <subtype>_universal._sub._ipp._tcp</subtype>
    <port>631</port>
    <txt -record>txtvers=1</txt>
    <txt -record>qtotal=1</txt>
    <txt -record>rp=printers/Canon-MX850</txt>
    <txt -record>ty=Canon PIXMA iP5300 – CUPS+Gutenprint v5.2.6 Simplified</txt>
    <txt -record>note=Saturn</txt>
    <txt -record>product=(Canon PIXMA iP5300)</txt>
    <txt -record>printer-state=3</txt>
    <txt -record>printer-type=0xB01E</txt>
    <txt -record>Transparent=T</txt>
    <txt -record>Binary=T</txt>
    <txt -record>Duplex=T</txt>
    <txt -record>Copies=F</txt>
    <txt -record>pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png</txt>
    <txt -record>URF=none</txt>
    </service>

    [/code]

    7. Save the file. avahi-daemon should notice the new file and load it without a needed restart.

    8. Add the following to /etc/cups/cupsd.conf near the top

    [code]
    ServerAlias *
    Port 631
    [/code]

    9. Restart CUPS “/etc/init.d/cups restart”

    10. On your iPhone/iPad, go into Safari, print, and search for printers. Your new printer should be in there.

    —————————-

    Update: as of June 28, AirPrint is built-in on Ubuntu 11.10.
    1. On your computer start system-config-printer via System ->
    Administration -> Printing (GNOME Classic) or via Turn-off-button at the
    upper right -> System Settings -> Hardware -> Printing (Unity Natty) or
    via the command line (all systems including Unity Oneiric).

    2. In system-config-printer choose Server -> Settings and activate
    “Published shared printers connected to this system”. Click OK and then
    right-click on the icon of your print queue and choose Properties in the
    pop-up menu. In the Policies section of the dialog make sure that
    “Shared” is activated.

    3. Make sure your mobile device is accessing your local network using
    WLAN and then open an application with printing functionality on it
    (like for example the browser or the photo viewer). Print something. The
    print dialog should show your print queue and allow some basic settings.
    Note that the Description/Info field and not the name of the queue is shown.

    4. Check whether you get a correct printout.