more local firewall

This commit is contained in:
rootzoll 2019-01-15 20:45:13 +01:00
parent bc475ec8a7
commit 198c08eabc
2 changed files with 4 additions and 4 deletions

View File

@ -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 ""

View File

@ -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."