Distro Specific Notes - lstein/Net-ISP-Balance GitHub Wiki
Distro Specific Notes
Arch Linux
IP Forwarding
You may need to add the following in systemd-networkd's interface configuration file if your distro meets the criteria listed in the note at the below reference.
IPForward=kernel
Reference: https://wiki.archlinux.org/index.php/Internet_sharing#Enable_packet_forwarding
File Locations
Arch Linux stores files in /etc/balance.
Autostarting on Boot
Create the file /etc/systemd/system/loadbalance.service with the following contents:
[Unit]
Description=ISP Load Balancer
[Service]
ExecStart=/startup.sh
[Install]
WantedBy=multi-user.target
Now create /startup.sh with the following contents:
#!/bin/sh
/usr/bin/perl /usr/bin/site_perl/load_balance.pl
#/usr/bin/ntpdate -u pool.ntp.org
#myip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
#echo "My WAN/Public IP address: ${myip}"
#dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'
Note: Only the first two lines are required.
Syslog
To see messages that are sent to syslog type the command journalctl.
Use journalctl -b0 to only show messages since boot.
DHCP Server & PXE (TFTP SERVER)
If your internet load balancer is also responsible for handing out IP addresses, be sure to add the following to the firewall directory. For my setup, I have created the file /etc/balance/firewall/03.dhcp.conf that allows TFTP and DHCP connections:
iptables -A INPUT -p udp -m udp --dport 67 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 68 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 69 -j ACCEPT
iptables -A INPUT -p tcp --syn --dport 69 -j ACCEPT