Last active
August 8, 2024 17:44
-
-
Save YouROK/21617b476ea914cc5b76d72903d6702f to your computer and use it in GitHub Desktop.
Install Antizapret to vps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Установка проверялась на Ubuntu 20.04, на других версиях может не работать | |
Для установки на впс зайдите на совой впс по ssh из под рута, скопируйте строку ниже и вставьте в терминал | |
rm install-az.sh; wget https://gist.githubusercontent.com/YouROK/21617b476ea914cc5b76d72903d6702f/raw/install-az.sh && chmod +x ./install-az.sh && ./install-az.sh | |
После установки, если нет подключения, то нужно добавить эти строчки перед ключами | |
pull-filter ignore block-outside-dns | |
route 8.8.8.8 255.255.255.255 vpn_gateway | |
route 77.88.8.8 255.255.255.255 vpn_gateway | |
если днс с другими ip, то меняем на свои | |
Если в впн нужно добавить свои файлы, то меняем на впс файл include-hosts-custom.txt | |
Получаем файл из контейнера | |
lxc file pull antizapret-vpn/root/antizapret/config/include-hosts-custom.txt include-hosts-custom.txt | |
Добавляем/убираем свои хосты | |
далее нужно внести этот файл в контейнер антизапрета и обновить | |
lxc file push include-hosts-custom.txt antizapret-vpn/root/antizapret/config/include-hosts-custom.txt | |
lxc exec antizapret-vpn -- sh -c "LANG=C.UTF-8 /root/antizapret/doall.sh" | |
Для удаления контейнеров | |
snap remove --purge lxd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.co | |
twimg.com | |
fbcdn.net | |
cdninstagram.com | |
fb.com | |
messenger.com | |
theins.ru | |
www.themoviedb.org | |
themoviedb.org | |
api.themoviedb.org | |
image.tmdb.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function exitErr { | |
echo "Error install script" | |
exit 1 | |
} | |
cd /root | |
apt update -y || exitErr | |
apt upgrade -f -y || exitErr | |
apt install -y snapd || exitErr | |
snap remove --purge lxd | |
snap install lxd --channel=4.0/stable || exitErr | |
rm lxd_az.yaml | |
[[ ! -f include-hosts-custom.txt ]] && wget https://gist.githubusercontent.com/YouROK/21617b476ea914cc5b76d72903d6702f/raw/include-hosts-custom.txt | |
wget https://gist.githubusercontent.com/YouROK/21617b476ea914cc5b76d72903d6702f/raw/lxd_az.yaml || exitErr | |
lxd init --preseed < lxd_az.yaml || exitErr | |
lxc image import https://antizapret.prostovpn.org/container-images/az-vpn --alias antizapret-vpn-img || exitErr | |
lxc init antizapret-vpn-img antizapret-vpn || exitErr | |
lxc config device add antizapret-vpn proxy_1194 proxy listen=tcp:[::]:1194 connect=tcp:127.0.0.1:1194 || exitErr | |
lxc config device add antizapret-vpn proxy_1194_udp proxy listen=udp:[::]:1194 connect=udp:127.0.0.1:1194 || exitErr | |
lxc file push include-hosts-custom.txt antizapret-vpn/root/antizapret/config/include-hosts-custom.txt || exitErr | |
lxc start antizapret-vpn || exitErr | |
echo "Ожидаем запуска 20 секунд" | |
sleep 20 || exitErr | |
lxc file pull antizapret-vpn/root/easy-rsa-ipsec/CLIENT_KEY/antizapret-client-tcp.ovpn antizapret-client-tcp.ovpn || exitErr | |
clear | |
echo "#**************************************************************************************************************************" | |
echo "Ключ находится в папке на сервере:" | |
echo `pwd` | |
echo "Или можете скопировать эту настройку и вставить у себя в файл antizapret-client-tcp.ovpn" | |
cat antizapret-client-tcp.ovpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config: {} | |
networks: | |
- config: | |
ipv4.address: 10.0.5.1/24 | |
ipv4.nat: "true" | |
ipv6.address: none | |
description: "" | |
name: lxdbr0 | |
type: "" | |
project: default | |
storage_pools: | |
- config: | |
size: 1GB | |
description: "" | |
name: default | |
driver: zfs | |
profiles: | |
- config: {} | |
description: "" | |
devices: | |
eth0: | |
name: eth0 | |
network: lxdbr0 | |
type: nic | |
root: | |
path: / | |
pool: default | |
type: disk | |
name: default | |
projects: [] | |
cluster: null |
некоторые сервера остались недоступны - nnmclub.to rutracker.net (((
Все работает
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
некоторые сервера остались недоступны - nnmclub.to rutracker.net (((