The documentation could include something like this: #!/bin/sh # Turn a system with profile 'Minimal' into a gateway/firewall. # sed -i 's/auto eth0/auto eth0 eth1/' /etc/network/interfaces sed -i '/eth1/ s/dhcp/static/' /etc/network/interfaces echo 'address 10.0.0.1' >> /etc/network/interfaces echo 'netmask 255.0.0.0' >> /etc/network/interfaces hostname -b gateway hostname > /etc/hostname service networking stop service networking start sed -i 's#NAT=#NAT="10.0.0.0/8"#' /etc/default/enable-nat service enable-nat restart # You might want a firewall (shorewall or ufw) and traffic shaping. #apt update #apt install shorewall # or #apt install ufw #apt install wondershaper
The script has been tested to do what it should do, but might be smarter. Wolfgang
signature.asc
Description: PGP signature