-
Notifications
You must be signed in to change notification settings - Fork 87
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 support for Dynamic Split Include Tunneling #68
Comments
Documentation for this feature is here: |
I have never seen this XML before. Can you give more information? Exactly when/where does this show up in the Cisco ASA's response? Can you show a log of I want to know if these split-DNS domains also show up in the
I believe this would fall under the general topic of #fancy-split-dns which we have been discussing for a while now. Also see https://gitlab.com/openconnect/vpnc-scripts/-/issues/5 for some further discussion of how split-DNS can be handled. |
|
Here's what documentation says:
So apparently, it's not a run-once script, it resolves and adds IPs to the routing table dynamically. So there should be some kind of agent that watches for DNS requests and adds a route whenever it matches the configured domain names inclusions/exclusions. This way subdomains are handled. Since it's impossible to know which subdomains exist. The official Cisco Anyconnect on Linux doesn't seem to support this feature either (only Mac and WIndows). Maybe something to do with how the resolver daemon works. |
Here's a tutorial how to set it up: |
Thanks for the log. This is quite strange. Basically, the split domains are appearing as part of the
They are not, however, appearing in the This is an extremely badly-designed place for the server to send this information, because it's part of the authentication response, not the connection response. That means that it won't necessarily even be seen by the client software upon reconnection, and won't work at all with 2-phase authentication. Nevertheless, as long as you do the authentication and connection in a single invocation it's fairly easy to make OpenConnect shoehorn the list of domains into its connection information. Please test this modified version of OpenConnect where I've added the relevant functionality; it should cause the relevant domains to get exported to vpn-slice/vpnc-script in the As for actually getting the functionality that you want working, someone who actually wants this feature needs to implement a working split-DNS handler for their platform, and integrate it into vpn-slice and/or the "full" vpnc-script. See:
|
Are you talking about Well, maybe there's a different between the "Split DNS" feature and the "Dynamic Split Include Tunneling" one. The difference between the Split Include and the Dynamic Split Include appears to be that the former specifies routes that are added once per connection (static ip addresses), while the latter are "dynamic", that is should be maintained in runtime whenever there's a DNS query (domain-based IP routes). |
Again, see the discussion here, and the blog post it links to: https://gitlab.com/openconnect/vpnc-scripts/-/issues/5 Per @dwmw2's comment here:
You tell me. I have not seen any explanation of how/why As I wrote in the other thread, the idea of doing split-{in,ex}cludes at the hostname level is both flawed conceptually and rather difficult to execute in a reasonable way.
Yes. We already know how to handle IP-based split-{in,ex}cludes. Those are quite straightforward to understand, because they operate at the IP layer, just as the VPN tunnel itself does. |
@dlenski
So it still related to DNS queries, that is how to route the DNS traffic (when split routing is enabled). It isn't related to how IP route table is configured. Bacically, it's a "deep packet inspection"-based routing for DNS queries. That is traffic is split before hitting the DNS server. This is to prevent DNS leakage. The |
Maybe the issue should be raised in https://github.com/systemd/systemd to request a feature to be used by VPN clients so that they can spy for DNS queries and either update the routing table accordingly or select which DNS to send the request to: public or private. It already has some support for split-tunneling DNS queries: https://fedoraproject.org/wiki/Changes/systemd-resolved#Split_DNS |
Interesting.
Is this not already possible via dbus, as you wrote? |
I don't know. If it is, it's not documented: You can only set SetLinkDNS+SetLinkDomains to route DNS queries to your custom DNS server. It doesn't provide any help with setting up DNS resolution chains. |
I've created an issue: systemd/systemd#17265 |
Yeah, maybe setting up a CoreDNS server and writing a plugin for it would be the most realistic option. This is how it might work:
|
@dlenski could you help me out with a first step? How do I get the XML passed on from openconnect to my custom script? |
As I wrote above, I already patched OpenConnect to do just this, which you should test. #68 (comment) It is intended to pass the list of domains from the (Per the docs you linked, we probably want to put them in a new variable called something like |
…<opaque>) See dlenski/vpn-slice#68 and https://gitlab.com/openconnect/vpnc-scripts/-/issues/5 Signed-off-by: Daniel Lenski <[email protected]>
No, I left the company that used this VPN configuration. So I don't need this anymore. |
When authenticating to Cisco ASA it responds with the following section in xml:
Is it possible to add those automatically when connecting via openconnect?
The text was updated successfully, but these errors were encountered: