Dynamic split tunnelling with DNS subdomains
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.6k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
I've been searching all over to see if this is possible with the latest openvpn 2.6
Currently I'm usng a Cisco AnyConnect VPN Setup but I'm trying to migrate across to openvpn via opnsense
Anyconnect has a feature called Dynamic split tunneling
The way we're currently using this is, if someone tries to access an address such as
ec2-1-2-3-4.eu-west-2.compute.amazonaws.com (the first part being an external fixed ip)
It's configured to detect that the domain name contains "compute.amazonaws.com" and therefore should be forwarded over the tunnel
and not accessed directly from the clients internet.
So in effect the source IP of the connection to the aws instance is changed to that of the openvpn server instead of being the clients machine as its going over the tunnel.
Now I've discovered that is is possible to do this for single address's
by adding to the client config something like the below
route ec2-1-2-3-4.eu-west-2.compute.amazonaws.com 255.255.255.255
But what I'm actually aiming for is this to target a wildcard or subdomain of *.compute.amazonaws.com
So that if a client tries to access anything on that subdomain it's passed via the VPN.
I suspect this might not be possible as I have a feeling the dns names in the list of routes are resolved when the connection is first brought up.
Does anyone know if this form of routing is supported?
If not with the free version of openvpn, perhaps with the more commercial Access Server?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are identified. Start by reviewing the OpenVPN 2.6 client route handling and DNS-related documentation, then determine whether wildcard subdomain matching is supported. Done would mean a documented, tested way to route all matching compute.amazonaws.com destinations through the VPN, or a clear statement that it is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- networking, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100