Use VPN in n.eko, modified by m1k1o, including Traefik-Ready docker-compose.
In neko, go to http://vpn/
and change VPN server from Web UI:
You will need to have Docker and Docker-compose installed.
- Clone this repository with submodules:
git clone --recurse-submodules https://github.com/m1k1o/neko-vpn
cd neko-vpn
- Copy
.env.example
to.env
and modify:
cp .env.example .env
- Copy all
.ovpn
files intovpn/
folder.
If you are using authentication in your VPN files (i hope you do so), you might want to include username and password as well. Please read tutorial here how to do it.
If you just want to publish port for neko or use custom reverse proxy, this is your variant.
docker-compose up -d
TIP: If you are using reverse proxy, you might want to have published your port only for loopback. Use HTTP_PORT="127.0.0.1:80"
. Now you can connect to container only from your maschine.
If you are already using Traefik, you might want to add this container to your existing domains. Please refer to .env
file for further information. Maybe it will fit your use case.
docker-compose up -f docker-compose.traefik.yml -d
You can connect to this VPN service using Proxy vpn:3128
.
If you want your container to use VPN's routes, add this to docker-compose:
my-service:
image: "my-image"
network_mode: "service:vpn"
Remember, since your container will be using network of VPN, traffic to published ports will be routed through VPN as well. Only local traffic will not, so you'll need reverse proxy, e.g. Traefik. It can handle now also TCP and UDP connections.