No special steps are required, follow instructions.
- Install OpenVPN client
- In the
antizapret-client-client-tcp.ovpn
orantizapret-client-udp.ovpn
OpenVPN configuration file, add the lines:pull-filter ignore block-outside-dns route 77.88.8.8
- Add an OpenVPN connection under
Internet
>Other Connections
>VPN Connections
>Add Connection
.- Use to connect to the Internet: ``NONE''.
- connection name:
AntiZapret
. 3 Type (protocol):OpenVPN
. - Receive routes from the remote party:
YES
. - OpenVPN configuration:
Content file from item 2
. Save
.
Network Rules
>Internet Filters
.- DNS Settings > Add Profile
- profile name:
AntiZapret
. - query transit:
NONE
. Save
.Add Server
.- DNS server type:
Default
. - IP address:
77.88.8.8
. Save
.
- DNS server type:
- profile name:
Content Filter
.- Filtering mode:
Public DNS resolvers
. - Default content filtering profiles (
guest
andhome
):AntiZapret
.
- Filtering mode:
- DNS Settings > Add Profile
- Under
Internet
>Other Connections
enableAntiZapret
connection. Done!
Warning
Amnezia Wireguard requires firmware version 4.2+ to work. Until 4.2 is introduced in the stable branch, you can use regular WireGuard on port 443. But it may not work for everyone, I recommend using Amnezia.
-
Install Docker Engine:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
-
Clone the repository:
git clone https://github.com/xtrime-ru/antizapret-vpn-docker.git antizapret cd antizapret
-
Generate password for wireguard admin panel:
docker run --rm ghcr.io/wg-easy/wg-easy wgpw 'YOUR_PASSWORD' | sed "s/'//g" | sed -r 's/\$/\$\$/g' | tee ./wireguard/wireguard.env
-
Create a file
docker-compose.override.yml
with the following content:Pay attention to WireGuard's assigned port! 443 bypasses blocking better, but may be considered by your hoster as an attempted DDoS attack on your server. If you experience any lags or connection failures, change 443 to another port first!
services: antizapret-vpn: environment: - DNS=adguardhome - ADGUARD=1 - OPENVPN_OPTIMIZATIONS=1 - OPENVPN_TLS_CRYPT=1 # Port for OpenVPN - OPENVPN_PORT=6841 ports: # Port for OpenVPN (you can delete ports if you don't need them) - "6841:1194/tcp" - "6841:1194/udp" depends_on: - adguardhome adguardhome: extends: file: docker-compose.adguard.yml service: adguardhome container_name: adguardhome ports: # Port for installation, can be deleted afterwards - "6844:3000/tcp" # Port for AdGuard control panel - "6845:80/tcp" # For Amnezia, replace with # amnezia-wg-easy wg-easy: environment: # Allow routing of all IP addresses, routes are manually added to the router anyway # This way you can use the connection for a full VPN - WG_ALLOWED_IPS=0.0.0.0.0/0 # Forced redirection of all DNS (udp 53) to antizapret # In keenetic, route 77.88.8.8.8 (or any other DNS) to WG gateway (added automatically) # When WG goes down, DNS works directly. - FORCE_FORWARD_DNS=true # Language - LANGUAGE=en # Port for WireGuard control panel - PORT=6843 # WireGuard port - WG_PORT=443 ports: # Port for WireGuard control panel - "6843:6843/tcp" # WireGuard port - "443:443/udp" extends: # For Amnezia, replace with # file: docker-compose.wireguard-amnezia.yml file: docker-compose.wireguard.yml # For Amnezia, replace with # service: amnezia-wg-easy service: wg-easy
-
Assemble the container:
docker compose pull docker compose up -d
-
Installing AdGuard Home
- Installation script:
http://<SERVER_IP>:6844
. - Control Panel:
http://<SERVER_IP>:6845
.
- Installation script:
-
Create a profile in Wireguard:
http://<SERVER_IP>:6843
. -
Download the profile and go to the client part
- Install the "WireGuard VPN" component
- Load the profile downloaded from the panel
Internet
>Other Connections
>Wireguard
>Download from file
. - open the downloaded connection and check
Use for Internet access
. (Optional, change the name toAntizapret
). Network Rules
>Routing
.Add route
.- route type:
Route to node
. - Description:
AntiZapretDNS
. - destination node address:
77.88.8.8
- gateway address:
empty
. - Interface:
Antizapret
(if you did not change the name, by file name)
- route type:
Add Route
.- route type:
Route to network
. 2 Description:AntiZapret
. - destination network address:
10.224.0.0
- Subnet mask:
255.254.0.0.0/15
. - Gateway address:
blank
. - Interface:
Antizapret
(if you did not change the name, then by file name)
- route type:
Network Rules
>Internet Filters
.- DNS Setup > Add Profile.
- profile name:
AntiZapret
. - query transit:
NONE
. Save
.Add Server
.- DNS server type:
Default
. - IP address:
77.88.8.8
. Save
.
- DNS server type:
- profile name:
Content Filter
.- Filtering mode:
Public DNS resolvers
. - Default content filtering profiles (
guest
andhome
):AntiZapret
.
- Filtering mode:
- DNS Setup > Add Profile.
Internet
>Ethernet
- Find your active ISP connect:
- Enable checkbox
Ignore DNSv4 from ISP
- Enable checkbox
Ignore DNSv6 from ISP
- Enable checkbox
- Find your active ISP connect:
Note
If using Amnezia Wireguard, there are a few more steps to follow instructions starting at step 20. I'll briefly duplicate it here.
-
Go to settings, click on the gear image in the upper right corner of the web page, and click on
Command Line
link. -
Send a request:
show interface
. -
Now we need to find out the name of the desired interface, by the name of the previously created connection. To do this, open a search on the page (you can do this by pressing two keys simultaneously, Ctrl+F). Enter for the search, the name of the previously created connection. In this example, it is
AntiZapret
. One, unique name should be found in thedescription
field. And next to it, there will be another field,interface-name
, which displays the name of the desired interface. In this example, it isWireguard1
. -
Now, knowing the interface name and the values of the asc parameters from the .conf file we saved earlier. We need to replace all the template values in brackets with your values, and delete the brackets themselves.
interface {name} wireguard asc {jc} {jmin} {jmax} {s1} {s2} {h1} {h2} {h3} {h4}
To give an example, you get a string like this:
interface Wireguard1 wireguard asc 8 50 1000 30 32 1811016522 1196729875 457766807 1765857463
.The resulting string should be pasted into the web version of the router's command line, and the "Send Request" button should be clicked.
-
Send the request:
system configuration save
.
In the Internet
> Other connections
section, enable the AntiZapret
connection.
Done!
In the process of writing
In progress