Browse Source

Force to use local dnsmasq for dns resolution in firewall hook

Alexandre Aubin 3 years ago
parent
commit
7a72696f45
1 changed files with 2 additions and 2 deletions
  1. 2 2
      conf/hook_post-iptable-rules

+ 2 - 2
conf/hook_post-iptable-rules

@@ -1,8 +1,8 @@
 #!/bin/bash
 
 server_names=$(grep -o -P '^\s*remote\s+\K([^\s]+)' /etc/openvpn/client.conf | sort | uniq)
-host6=$(dig AAAA +short $server_names | grep -v '\.$')
-host4=$(dig A +short $server_names | grep -v '\.$')
+host6=$(dig AAAA +short $server_names @127.0.0.1 | grep -v '\.$')
+host4=$(dig A +short $server_names @127.0.0.1 | grep -v '\.$')
 
 # In case an ip has been provided in ovpn conf
 for i in ${server_names}; do