use iptables-persistent

main
glen 4 years ago
parent 7bf5b9516b
commit 8ea1671cfb

@ -138,6 +138,8 @@ function configure_exit() {
sed -i 's#\#ifaddr=#ifaddr=172.16.0.1/16#g' /var/lib/lokinet/lokinet.ini sed -i 's#\#ifaddr=#ifaddr=172.16.0.1/16#g' /var/lib/lokinet/lokinet.ini
sed -i 's#\#paths=6#paths=8#g' /var/lib/lokinet/lokinet.ini sed -i 's#\#paths=6#paths=8#g' /var/lib/lokinet/lokinet.ini
sed -i 's#\#net.ipv4.ip_forward=1#net.ipv4.ip_forward = 1#g' /etc/sysctl.conf sed -i 's#\#net.ipv4.ip_forward=1#net.ipv4.ip_forward = 1#g' /etc/sysctl.conf
iptables -t nat -A POSTROUTING -s 172.16.0.1/16 -o eth0 -j MASQUERADE
iptables-save > /etc/iptables/rules.v4
sudo sysctl -p /etc/sysctl.conf sudo sysctl -p /etc/sysctl.conf
sudo systemctl restart lokinet sudo systemctl restart lokinet

@ -1,4 +1,4 @@
UPDATE_URL="https://raw.githubusercontent.com/necro-nemesis/Daedalus-SNAppCrafter/master/" UPDATE_URL="https://raw.githubusercontent.com/necro-nemesis/SBC-Lokinet-Micro-Exit/master/"
wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/exitcommon.sh wget -q ${UPDATE_URL}/installers/common.sh -O /tmp/exitcommon.sh
source /tmp/exitcommon.sh && rm -f /tmp/exitcommon.sh source /tmp/exitcommon.sh && rm -f /tmp/exitcommon.sh
@ -14,7 +14,7 @@ function install_dependencies() {
curl -s https://deb.imaginary.stream/public.gpg | sudo apt-key add - curl -s https://deb.imaginary.stream/public.gpg | sudo apt-key add -
echo "deb https://deb.imaginary.stream $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/imaginary.stream.list echo "deb https://deb.imaginary.stream $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/imaginary.stream.list
sudo apt-get update sudo apt-get update
sudo yes | apt-get install git screen dnsutils python3 resolvconf lokinet || install_error "Unable to install dependencies" sudo yes | apt-get install git screen dnsutils python3 resolvconf lokinet iptables-persistent|| install_error "Unable to install dependencies"
} }
install_Exit install_Exit

Loading…
Cancel
Save