Hosting services is much more fun when we can be sure that malfunction of a single disk won't shut down services and cause data loss. FreeBSD Handbook has a chapter about Creating a Mirror with Two New Disks, but it suggests some outdated practices such as legacy BIOS boot and MBR partitioning s...
I had a situation where zpool on external USB disk would not get imported automatically at boot time. but manual zpool import extwd worked fine. I guessed rc script which imports known zpools at boot time runs before USB disk gets attached, so I looked for mechanism which would trigger import on attach. In FreeBSD this can be done with devd - device state change daemon.
I have recently moved my MX server to a new IPv4 address. Admittedly, new IPv4 address is in quite bad neighbourhood, a residential /24 pool provided by ISP who doesn't filter outgoing SMTP by default. Most other IPv4 addresses in this pool have quite poor reputation, probably without their users even knowing their malware infested devices are being used to send spam. It took less than a week since I took over this new IPv4 for it to get dropped from most of lists such as spamhaus which actively monitor and list spamming IP addresses, delisting them automatically when spamming stops.
Having broadband access to the Internet is ubiquitous in most households in Europe. The setup usually comprises of a device provided by ISP (Internet Service Provider) - commonly known as router - which connects to ISP's infrastructure over fiber or coaxial cable, and provides Internet connectivity to devices on home LAN (Local Area Network) connected to it. A router usually provides a few LAN ports for plugging wired devices such as desktop computers, as well as WiFi network to which wireless devices such as laptops, tablets, mobile phones, and increasing number of other types of appliances connect by means of selecting provided WiFi network and typing in its password. Once connected, one can browse webpages, engage in social networking, send and receive emails, watch movies and listen to music on various streaming platforms, play online games, chat by means of text messages, audio or video calls, do online shopping or banking or any of other things that people usually do "on the Internet". Most people can't be bothered to try to understand actual mechanisms which give them access to the "Internet". Recently, however, I have noticed that more and more people around me begin to understand that Internet isn't just a thing they access and use. They start to intuitively feel that Internet is also accessing and using them, sometimes to their disadvantage, and they start to ask me how it does that and how can it be prevented. Answers to those questions exist, and are quite exact, but they require quite a bit of reading and understanding. The following article tries to explain most basic terminology of home networks.
FreeBSD offers two basic technologies for installing third-party applications. The easiest way is installing precompiled packages from official FreeBSD's package repositories. Somewhat more complicated, but more flexible way is compiling and installing applications using ports. Main shortcoming of official precompiled packages is the fact that they are being built with default set of options, whereas advanced setups often need to enable non-default option (e.g. LDAP authentication), change target database support (e.g. PostgreSQL instead of MySQL), or to disable undesirable default option (e.g. X11 support on headless servers). Luckily, there's additional way which combines flexibility of ports with simplicity of packages provided by Poudriere. The following article will help you set your own FreeBSD package repository where you will be able to compile your own packages from ports, and serve them to your other FreeBSD boxes. In a jail, of course!
In previous post we have prepared our jail host to be jail-friendly. In this one we will set up our first jail.
Now that we have secured our FreeBSD system, as well as our data partitions - both UFS and ZFS - from unavailability caused by disk failures, we will prepare it for its role of jail host. This requires reconfiguration of services that bind to all available interfaces to bind to specific interfaces instead. Jail manpage's section about setting up the host environment gives general guidelines, but it mentions services which are usually not enabled by default on contemporary FreeBSD versions (sendmail, inetd and rpcbind), while it does not mention services which are (ssh, ntp and syslog). This article gives instruction on how to bind sshd, ntpd and syslogd to specific interfaces, as well on how to create additional loopback interface. Finally we will modify hosts file.