firewalld's direct rules to block all incoming and outgoing connections except for on a
tun interface, making a kill switch for my VPN connections (similar to here).
I have since whitelisted specific VPN servers, and can connect to them directly.
Now I want to automate this process, and in doing so have to fetch statistical load data from my VPN provider's website.
I was thinking of calling something like
stats=$(curl provider.com/server/stats | *sed and grep extraction*)
but this requires DNS resolution, which is blocked at the moment. Is there a simple way, in shell scripting, to punch a hole in the firewall to temporarily only allow this one request?
I don't want to completely disable the firewall temporarily, possibly causing leakage.
Creating a proxy network or proxy machine feels like overkill. Is this truly such a complicated problem? I am seeking a solution simple in execution.