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

Add a way to query IP address through a specific interface #238

Open
1 of 2 tasks
nagisa opened this issue Mar 14, 2024 · 1 comment
Open
1 of 2 tasks

Add a way to query IP address through a specific interface #238

nagisa opened this issue Mar 14, 2024 · 1 comment

Comments

@nagisa
Copy link

nagisa commented Mar 14, 2024

Describe the bug

I have two uplinks in my system: wan0 and wan1. wan1 is wired, but is behind a CGNAT. wan0 is a backup link to a sattelite, but I get a dynamic IP address to use with this link that's not behind a CGNAT. The routes are set up such that by default packets are routed through (the CGNATed) wan1.

I would like godns to query the IP address through wan0 link specifically, so that it obtains the IP address through which the machine is actually reachable.

The frequency of this issue

  • This issue is easy to reproduce.
  • This issue is not easy to reproduce. -- requires multiple uplinks

Steps to Reproduce

Obtain two interfaces with a public internet access. Set up the routes such that they read like this:

$ ip route
default dev wan1 proto static scope link metric 1000 
default dev wan0 proto static scope link metric 1001 
...

Your GoDNS configuration

{
  "ip_url": "https://api.ipify.org/",
  "ip_type": "IPv4",
  "debug_info": true,
  "interval": 3600
}

Expected behavior

It should be possible to ask godns to make a request through wan0 specifically (this can be done by binding the TCP socket I believe) so that the machine making the request is actually reachable over the obtained IP address.

Screenshots

N/A

Environment (please complete the following information):

  • DNS Provider: N/A
  • OS: Linux

Additional context
Add any other context about the problem here.

@TimothyYe
Copy link
Owner

Thanks for your feedback, I think it's possible.
Let me figure out the solution.

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

No branches or pull requests

2 participants