Keeplocal allows you to control the cloud connectivity of your local smart devices.
Get the source code:
git clone https://github.com/mfucci/keeplocal.git
cd keeplocal
npm install
Build and install:
npm run build
sudo npm install -g
On your local device:
- switch to permanently use a static IP
- manualy specify DNS / gateway IPs
- make sure that you can still access the internet
On your router:
- WARNING: this will temporary disconnect all your local devices using dynamic IPs
- disable IPv6
- disable the DHCP service for IPv4
Start the daemon:
sudo keeplocal daemon
List all the devices connected on your network:
keeplocal list
List all the devices connected on your network:
keeplocal list
Rename a device to identify it better:
keeplocal rename <device_mac> <name>
Prevent a device to access the cloud:
keeplocal gate <device_mac>
Give back access the cloud:
keeplocal ungate <device_mac>
Install the service configuration:
sudo cp conf/keeplocal.service /etc/systemd/system/
Activate and start:
sudo systemctl daemon-reload
sudo systemctl enable keeplocal
sudo systemctl start keeplocal
Check status and logs:
systemctl status keeplocal
Keeplocal actually declares the device running keeplocal as the router for gated devices, so you can use bash route
command to whitelist specific servers.
Turn back on the DHCP server on your router.