Browse Source

more local firewall

dev
rootzoll 6 years ago
parent
commit
198c08eabc
  1. 4
      home.admin/90finishSetup.sh
  2. 4
      home.admin/config.scripts/lnd.export.sh

4
home.admin/90finishSetup.sh

@ -66,9 +66,9 @@ sudo ufw allow 8080 comment 'lightning REST API'
echo "allow: trasmission"
sudo ufw allow 51413 comment 'transmission'
echo "allow: local web admin"
sudo ufw allow from 192.168.0.0/24 to any port 80 comment 'allow local LAN web'
sudo ufw allow from 192.168.0.0/16 to any port 80 comment 'allow local LAN web'
echo "open firewall for auto nat discover (see issue #129)"
sudo ufw allow proto udp from 192.168.0.0/24 port 1900 to any comment 'allow local LAN SSDP for UPnP discovery'
sudo ufw allow proto udp from 192.168.0.0/16 port 1900 to any comment 'allow local LAN SSDP for UPnP discovery'
echo "enable lazy firewall"
sudo ufw --force enable
echo ""

4
home.admin/config.scripts/lnd.export.sh

@ -74,9 +74,9 @@ elif [ ${exportType} = "http" ]; then
sudo cp /home/bitcoin/.lnd/data/chain/${network}/${chain}net/readonly.macaroon ./${randomFolderName}/readonly.macaroon
sudo cp /home/bitcoin/.lnd/tls.cert ./${randomFolderName}/tls.cert
cd ${randomFolderName}
sudo ufw allow from 192.168.0.0/24 to any port ${randomPortNumber} comment 'temp http server'
sudo ufw allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server'
python -m SimpleHTTPServer ${randomPortNumber}
sudo ufw delete allow from 192.168.0.0/24 to any port ${randomPortNumber} comment 'temp http server'
sudo ufw delete allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server'
cd ..
sudo rm -r ${randomFolderName}
echo "OK - temp HTTP server is stopped."

Loading…
Cancel
Save