mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #236] Restrict external access? #217
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GiganteX on GitHub (Apr 25, 2021).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/236
Hi!
Can I (and how?) prevent users accessing external addresses? If I only want them to connect to the VPN for accessing an internal service and absolutely do not want them doing anything else while connected?
@hwdsl2 commented on GitHub (Apr 26, 2021):
@GiganteX Hello! This feature is not supported in this Docker image. On a higher level, it will require changes to the IPTables FORWARD rules inside the Docker container, to permit only specific IP addresses.
@GiganteX commented on GitHub (Apr 26, 2021):
You mean I could "docker exec" into the container and modify some settings to make it work? Could you ELI5 how I can accomplish it?
@hwdsl2 commented on GitHub (Apr 27, 2021):
First, start a Bash session in the running container:
Example: Assuming that you want to only allow VPN clients to access 10.0.0.0/24 through the VPN, you may add the following IPTables FORWARD rules:
Exit the container when finished. Give it a try and see if it works for your use case. If so, you may add these rules to the IPTables section in
/opt/src/run.sh, to persist after container restarts.