Skip to content

Conversation

@wellenvogel
Copy link

I propose to add a timeout parameter to redsocks.
usage Scenario:
When using redsocks to also redirect naming resolution (DNS) via forward of udp port 53 to the built in DNS responder (with forcing redirect to tcp), the resolver get's a bit confused when the remote host is unreachable as it is able to connect but times out on send/receive. This leads to long timeouts when using DNS resolution (with no chance to lower them by resolver settings).
With an additional timeout option we can easily configure a second redsocks section in the config file using an own port only for DNS forwarding and applying a timeout value there.
Example:
iptables -t nat -I REDSOCKS -d 0.0.0.0/0 -p tcp --dport 53 -j REDIRECT --to-ports 12346
and in the config file (beside the normal forwarding stuff):
redsocks {
local_ip = 127.0.0.1;
local_port = 12346;
ip=...
port=....
....
timeout = 1;
}

@darkk darkk force-pushed the master branch 6 times, most recently from 7fa694d to 5df6a30 Compare February 1, 2018 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants