-
Notifications
You must be signed in to change notification settings - Fork 499
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
Bind to interface instead of IP address? #51
Comments
That's not possible with the socket API. You can listen to You should bind to a different fixed IP on a loopback or something, or just run iodine on a different port, and direct the ingress traffic to that particular host:port tuple. |
FYI: redirection can be achieved by using iptables REDIRECT or DNAT, e.g. (assuming eth0 = WAN interface and iodine listens on 5353)
Socket options SO_REUSEADDR / SO_REUSEPORT are interesting too but this way may require modification of your internal resolver to use them too. |
The NAT is good way for making this work on OpenWRT. |
I recently (f2b619f) added support for listening only on the external IP, without having to specify it (it is fetched via DNS query). If you run iodined on the machine with the WAN ip, it should be enough to use this flag and just restart it whenever your address changes. |
I'm running iodine daemon on OpenWRT (Linux 4.14)
Having a dynamic WAN IP, I'd find it great if iodined could listen on any IP, but only on a specific interface (WAN).
The current way of binding to 0.0.0.0 on any interface messes with my other DNS services.
Obviously I should (and will continue to try to) get a script hooked on an IP change on the WAN interface, that would then restart iodioned with the new address in the -l parameter (but apparently I'm too stupid for that).
The text was updated successfully, but these errors were encountered: