This repository provide an easy way to create a wireguard server with ACL. Is built in top of wg-easy to provide an easy way to deny/accept only access of vpn users to some ips. The ACL can work in two possible modes:
ALLOW_SOME_DENY_ALL: Allow vpn users the access to only some ips.Default modeDENY_SOME_ALLOW_ALL: Deny vpn users the access to only some ips.
iptablesandiptables-persistentlinux packages installed. Tested ondebian.- docker
- bash
- make
- Root privileges
- Copy the distributed environment file
.env.distto.env. - All needed values to start a wg server are already setted for you. Refer to wg-easy if you want to customize it more. For a minimum of configuration this are the required variables:
# wg host example: vpn.example.com
WG_HOST=
# web ui password
PASSWORD=- Change if needed the default
ACL_MODEvariable depending on your use case. - To
allow/denysome ips editips.shfile and add them to theIPSvariable.- For
ACL_MODE=ALLOW_SOME_DENY_ALLthis ips are allowed and the rest are denied. - For
ACL_MODE=DENY_SOME_ALLOW_ALLthis ips are denied and the rest are allowed.
- For
- Start the server:
make up
Execute make down command to clean the DOCKER-USER iptables chain and remove the container and network created.
Set the value of ACL_MODE to DENY_SOME_ALLOW_ALL and keep empty the IPS variable in ips.sh file.
- Visit
localhost:9001or the port specified inPORTvariable. - Set the password to the one specified in the
PASSWORDvariable. - UI is very simple and straight forward just follow your instinct.