This morning, I had the 2nd annoyance since installing a Pihole on my home network. Pihole redirects DNS requests to a “hole” if the requested domain is found on one of the lists you configure it with.
The purpose of the Pihole application is to reduce needless traffic traversing your network. This is useful for things like tracking and ads. However there have been some times with a legitmate domain being blocked.
In both of these cases, I knew that I didn’t want or need to update my lists, I just needed to pause it for a brief time. Long enough to click a link in an email.
Problem is I am on my phone and I don’t really want to boot up a computer, SSH into the Pi, run the command. I’d rather just not click the link.
Then I checked out Shortcuts which is an app with comes with iPhone. Lo’ and behold there is an SSH function!
So here goes:
- Download Shortcuts from the App Store if you haven’t already got it.
- Open the app once it has downloaded and tap Create Shortcut
- Tap Add Action and search for SSH - Run Script Over SSH should appear, tap it!
This will add the action, but you need to configure it. Tap Show More. You will need to enter:
- Host - This is the IP address or hostname on your network where pihole is running
- Port - Usually
- User - If you’re using Raspberry Pi, you probably want to enter
pi(Professionals see end of page)
- Password - If you’re using Raspberry Pi, you probably want to enter
raspberry(Professionals see end of page)
- Script - type
pihole disable 30s
That is it.
I have also set up the shortcuts widget so that I can easily access the functionality from my home screen.
End of Page
If you are a pro. Then you are going to want to do a bit more than use the default username and password for your Raspberry Pi.
My advice would be to:
- Use SSH (yes the app supports SSH Key as well - I still need to do this)
- Create a 2nd user, which does not have root access to your device. In essence the
piuser is allowed to do anything on your Pi. So you are leaving yourself a little vulnerable…
You have been warned.
I hope you find this useful :-)