If you add your firewall commands in a (new) file "/etc/rc.d/rc.firewall" and make it executable, then Slackware will run that script on boot and you don't have to change anything - it's automatic.
cat <<EOF > /etc/rc.d/rc.firewall
# Use full path to binaries in a r script:
/usr/sbin/iptables -t nat -A POSTROUTING -o eth* -s *.*.*.*/24 -j MASQUERADE
chmod +x /etc/rc.d/rc.firewall
Note that the above instructions will overwrite an existing rc.firewall file, so be careful! If the file exists already, just add your iptables commandline to the end.