Category: FreeBSD

  • Multi-WAN DNS in pfSense

    Update: I later figured out there are many other places pfSense restarts Unbound, so this is simply not worth the effort. I reversed the changes & moved Unbound to another box and using just DNS forwarder on pfSense — which is used by the Unbound server. Having multiple broadband connections at home, I have a…

  • ZFS convert stripe to striped-mirror

    I’m a huge fan of ZFS because of its performance and other features like snapshots, transparent compression. In fact I had switched to FreeBSD for servers just because it had native ZFS support. But as of Ubuntu 16.04, ZFS is officially supported for non-root partitions. Now I’m migrating a FreeBSD server to Ubuntu 16.04 with…

  • Group based HTTP basic authentication using Nginx and MySQL with help of Lua

    Group based HTTP basic authentication using Nginx and MySQL with help of Lua

    Recently I moved from Apache to Nginx on one of my servers due to increase in traffic. But I was using HTTP Basic authentication with group based authorization on Apache in this manner: However, there’s no AuthGroupFile  in nginx. But LUA, a programming language is supported in nginx. So here’s how I used LUA and…

  • FreeBSD IPFW NAT and Jails

    IPFW in FreeBSD has built-in support for NATing and the configuration syntax is same as that of natd. It took me quite some time to figure out how to NAT for jails while ensuring that certain jails can have public IPs. Configure the nat on one of the IP addresses: When using stateful firewall, the…

  • FreeBSD ipfw: add_dyn_rule: Cannot allocate rule

    One of the servers I run has FreeBSD 10. It hosts a high traffic Magento site. Magento being a very heavy application, requires a dedicated server. The site’s performance is very bad when it is hosted on VPS — or perhaps that depends on provider / needs tuning. Not my site. My task was to…

  • The move from Linux to FreeBSD

    About 2 months ago, I had a spare VPS at my host, Hetzner. So I decided to play with FreeBSD which was being offered for Hetzner servers and VPSes.That’s how the whole thing started. I didn’t have much problems getting the concepts because it belongs to *nix family of OSes and I have been a…

  • Securing FreeBSD server with Fail2Ban and IPFW

    I’ve been playing with a FreeBSD machine for a while now and my primary server now runs FreeBSD 😀So I came across this problem: installing Fail2Ban with IPFW. FreeBSD has three different firewalls, so it’s difficult for any upstream application to decide on what kind of setup it should advocate. There is no one-size-fits-for-all. I…