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 mode
DENY_SOME_ALLOW_ALL
: Deny vpn users the access to only some ips.
iptables
andiptables-persistent
linux packages installed. Tested ondebian
.- docker
- bash
- make
- Root privileges
- Copy the distributed environment file
.env.dist
to.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_MODE
variable depending on your use case. - To
allow/deny
some ips editips.sh
file and add them to theIPS
variable.- For
ACL_MODE=ALLOW_SOME_DENY_ALL
this ips are allowed and the rest are denied. - For
ACL_MODE=DENY_SOME_ALLOW_ALL
this 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:9001
or the port specified inPORT
variable. - Set the password to the one specified in the
PASSWORD
variable. - UI is very simple and straight forward just follow your instinct.