myxuchangbin / dnsmasq_sniproxy_install

One-click Install and Configure Dnsmasq and Sniproxy for CentOS/Debian/Ubuntu
1.19k stars 539 forks source link

Temporary failure in name resolution #81

Open uby777881 opened 1 year ago

uby777881 commented 1 year ago

Hello, I have setup dnsmasq in VPS 1 and added the VPS 1 IP to VPS 2.

VPS 2 can't connect github after changing the DNS.

I contacted my VPS provider and they said port 53 UDP is not open and they will not open it.

Is there anyway i can use the VPS as DNS by changing the port 53 to any other random port? Let me know how

myxuchangbin commented 1 year ago

According to the document prompt, modify the configuration option port = 5353

uby777881 commented 1 year ago

My VPS provider said " UDP opens ports 30000-50000 " They only opens this port range.

uby777881 commented 1 year ago

Also i tried to change the port to 31154 and restarted Dnsmasq. Then i added this in my VPS2

chattr -i /etc/resolv.conf cp /etc/resolv.conf /etc/resolv.conf.bak rm /etc/resolv.conf cat > /etc/resolv.conf << EOF nameserver (my VPS1 IP)#31154 EOF

After this also it can't connect and got the same error "Temporary failure in name resolution "

myxuchangbin commented 1 year ago

resolv does not support configuring dns servers with ports

uby777881 commented 1 year ago

Oh. May i know how can i use the port 31154 and use the DNS IP in the slave VPS resolv

uby777881 commented 1 year ago

Please guide me the steps. Thank you

myxuchangbin commented 1 year ago

Then install the dnsmasq and listen to 127.0.0.1:53 Configure the upstream server on the dnsmasq to support custom ports Finally, the configuration in the /etc/resolv.conf is modified to be nameserver 127.0.0.1

uby777881 commented 1 year ago

That means i need to install Dnsmasq + SNI Proxy in my VPS 1 (support streaming media)

and install Dnsmasq only in VPS 2 (it doesn't support streaming media) ?

myxuchangbin commented 1 year ago

sniproxy can be installed in VPS1, only dnsmasq can be installed in VPS2. Modify the configuration in the dnsmasq to point Netflix resolution to VPS1