Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to fix it ? #7

Closed
lenvov opened this issue Apr 22, 2014 · 3 comments
Closed

how to fix it ? #7

lenvov opened this issue Apr 22, 2014 · 3 comments
Labels

Comments

@lenvov
Copy link

lenvov commented Apr 22, 2014

root@ROUTE:/opt/etc/tcpdnsproxy# /opt/bin/python2.6 tcpdns.py
*** Install gevent will save a lot of CPU time

TCP DNS Proxy, https://github.com/henices/Tcp-DNS-proxy
DNS Servers:
8.8.8.8
8.8.4.4
156.154.70.1
156.154.71.1
208.67.222.222
208.67.220.220
74.207.247.4
209.244.0.3
8.26.56.26
Query Timeout: 20.000000
Enable Cache: False
Now you can set dns server to 127.0.0.1
Traceback (most recent call last):
File "tcpdns.py", line 240, in
main()
File "tcpdns.py", line 194, in main
server = ThreadedUDPServer(('127.0.0.1', 53), ThreadedUDPRequestHandler)
File "tcpdns.py", line 177, in init
SocketServer.UDPServer.init(self, s, t)
File "/opt/lib/python2.6/SocketServer.py", line 402, in init
self.server_bind()
File "/opt/lib/python2.6/SocketServer.py", line 413, in server_bind
self.socket.bind(self.server_address)
File "", line 1, in bind
socket.error: [Errno 125] Address already in use

@lenvov
Copy link
Author

lenvov commented Apr 22, 2014

root@ROUTE:/tmp/home/root# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.1:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8086 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8087 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.1:22 192.168.1.207:58990 ESTABLISHED
tcp 62288 0 113.195.13.14:43933 74.125.23.94:443 ESTABLISHED
tcp 0 0 :::53 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 :::23 :::* LISTEN
udp 0 0 127.0.0.1:38032 0.0.0.0:*
udp 0 0 0.0.0.0:53 0.0.0.0:*
udp 0 0 0.0.0.0:67 0.0.0.0:*
udp 0 0 0.0.0.0:38000 0.0.0.0:*
udp 0 0 :::53 :::*
raw 0 0 0.0.0.0:255 0.0.0.0:* 255
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 9 [ ] DGRAM 576 /dev/log
unix 2 [ ] DGRAM 1582
unix 2 [ ] DGRAM 1379
unix 2 [ ] DGRAM 1356
unix 2 [ ] DGRAM 1069
unix 2 [ ] DGRAM 1048
unix 2 [ ] DGRAM 1035
unix 2 [ ] DGRAM 580

@lenvov
Copy link
Author

lenvov commented Apr 22, 2014

fix port 53 to 8081 ,can run on router ,but how to use it on the intarnet pc client. please help

@henices
Copy link
Owner

henices commented Apr 23, 2014

I'm look at the output of the netstat command, it seems that the udp port 53 is already listening, another application use the port , so the python script show Address already in use error.

Because you run the python script on a route, I think your should turn off the DNS services on your router.

Change the IP 127.0.0.1 to 0.0.0.0 at the python script tcpdns.py, on the intarnet pc client set the DNS server ip to the router's ip.

@henices henices closed this as completed May 1, 2014
@henices henices added the Usage label Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants