docker-openvpn icon indicating copy to clipboard operation
docker-openvpn copied to clipboard

How to whitelist IPs (everything is is blacklist aka not go through vpn)

Open ORESoftware opened this issue 3 years ago • 2 comments

I asked this question on devops.stackexchange.com: https://devops.stackexchange.com/questions/12999/how-to-only-go-through-openvpn-server-for-certain-ips

But honestly getting a little frustrated especially considering this seems to be a common need and not finding any answers on le internet, sorry to take it out on our dear readers here.

All I want to do is something like:

# config file
10.28.39.39  only_route_traffic_going_to_this_ip_through_the_vpn

how is this done? is there a build-arg or -e flag for this? thx

ORESoftware avatar Dec 19 '20 06:12 ORESoftware

Disable redirect-gateway and set a static route for that host in the configs.

erhan- avatar Dec 19 '20 16:12 erhan-

thanks I got an answer on SuperUser, but not sure if it gels with yours? https://superuser.com/a/1611133/1072503

is there an example in the docs for this (how to change config file for server)? happy to do it clientside instead of serverside too. Although clientside is out of your purview, might be easier for this?

to create collapsible sections of readme you can use html elements like:

<details>
<summary>How to whitelist ips</summary>

put some info in here
</details>

appreciate this tool, saved me a lot of time and working great so far.

ORESoftware avatar Dec 19 '20 17:12 ORESoftware