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

Multiple variants of similar hostnames? #63

Open
Gnyav opened this issue Aug 21, 2020 · 5 comments
Open

Multiple variants of similar hostnames? #63

Gnyav opened this issue Aug 21, 2020 · 5 comments
Labels

Comments

@Gnyav
Copy link

Gnyav commented Aug 21, 2020

Hi, So I'm new to the vpn configurations like this and networking in general, so I could be asking a very stupid question, but can I configure this to use multiple hostnames that are similar. I'm trying to connect to my office network, and we have things like account.dev.mycompany.com, addressbook.dev.mycompany.com, cart.dev.mycompany.com and so on...
so can i do something like a wildcard? *.dev.mycompany.com... (i mean not exactly like that... but you get the point)
since those are different services they are on different IPs, so i can't just add XXX.XXX.XXX.XXX and be done with it.

or just somehow tell it to use all local resources?

I see there is also a discussion about exclusions... i guess this could also work for me. i would just add exclusions to my most frequently used sites outside of the corporate ones, and just be content with the rest being routed through the corporate network... but i'm not sure if it's implemented?

@dlenski
Copy link
Owner

dlenski commented Aug 21, 2020

so can i do something like a wildcard? *.dev.mycompany.com... (i mean not exactly like that... but you get the point)

See #57. You can't do a * wildcard, because DNS doesn't support such a query, but you certainly can do vpn-slice {foo,bar,baz}.company.com with any POSIX-y shell.

@gmacon
Copy link
Collaborator

gmacon commented Aug 21, 2020

I think the curly-brace expansion is not part of POSIX, and off the top of my head, I think bash and zsh support it but dash (which is /bin/sh on Debian-derived systems) does not.

@Gnyav
Copy link
Author

Gnyav commented Aug 22, 2020

Well I was trying to avoid listing them specifically overall, since they are like double digits per env, 4 envs + like 10-20 outside those environments, like git, jira, wikies, logs and so on. and i don't even know all of them on top of my head... so if i miss one, something will break at some point for not being able to make a call. i guess i have to check if we have a list with all link somewhere in the wiki base, but i doubt it. and i'm using separate file to list them and can easily edit it so it's not the "physical" length of that list i'm worried about, but that i will miss a couple.

what about the exclusions? i saw a discussion about it, is it working? so i can say don't use youtube, stackoverflow, udemy, pluralsight, facebook and so on for the vpn. it would be easier for me than listing all that should be used :D and even if i "miss" something i'm using fairly often it would just use the vpn and still work :D

@gmacon
Copy link
Collaborator

gmacon commented Aug 22, 2020

It sounds like you might be interested in the fancy-split-DNS proposed feature. I don't think @dlenski has made a final determination about whether or not this feature is really in scope for vpn-slice, but you might find the discussion on those issues informative.

@dlenski
Copy link
Owner

dlenski commented Aug 24, 2020

Well I was trying to avoid listing them specifically overall, since they are like double digits per env, 4 envs + like 10-20 outside those environments, like git, jira, wikies, logs and so on. and i don't even know all of them on top of my head... so if i miss one, something will break at some point for not being able to make a call.

There's simply no way to implement this. DNS doesn't support wildcard queries.

what about the exclusions? i saw a discussion about it, is it working? so i can say don't use youtube, stackoverflow, udemy, pluralsight, facebook and so on for the vpn.

Patches with a well-considered user interface are welcome.

@gmacon is right that implementing this in a generalized way based on domain names rather than IP addresses will/would require new features that are rather far beyond the complexity and scope of what vpn-slice offers now.

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

3 participants