Вам нужно еще и на клиенте добавить маршрут до IP-адреса вашего сервера, чтобы он мог вам ответить. Сейчас пакеты с сервера клиенту доходит, но он отвечает на них через ваш домашний маршрутизатор/шлюз провайдера.
Проще сделать так, как вы изначально сделали. Либо же настройте обычный VPN под ваши нужды и маршрутизируйте фиктивный диапазон и DNS-сервер из контейнера АнтиЗапрета.
Здравствуйте. Спасибо за контейнер. Поднял на бесплатном сервере от Oracle, под управлением Ubuntu 20.04. У меня пара вопросов, если вам не трудно:
Голый сервер вместе с контейнером занимают 83% от выделенного 1 Гб оперативной памяти. Я, честно говоря, рассчитывал на меньшее потребление. Дело в Ubuntu?
Из коробки не работает) Я добавил правила в ufw, разрешив порты, но это тоже не сработало. Помогло фактическое разрешение всего в iptables:
Но данное решение мне не нравится, а квалификации в настройке iptables у меня 0. Может подскажете, какое правило надо добавить? Сейчас настройки (дефолтные) таковы:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere icmp parameter-problem /* generated for LXD network lxdbr0 */
ACCEPT icmp -- anywhere anywhere icmp time-exceeded /* generated for LXD network lxdbr0 */
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable /* generated for LXD network lxdbr0 */
ACCEPT tcp -- anywhere anywhere tcp dpt:domain /* generated for LXD network lxdbr0 */
ACCEPT udp -- anywhere anywhere udp dpt:domain /* generated for LXD network lxdbr0 */
ACCEPT udp -- anywhere anywhere udp dpt:bootps /* generated for LXD network lxdbr0 */
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere /* generated for LXD network lxdbr0 */
ACCEPT all -- anywhere anywhere /* generated for LXD network lxdbr0 */
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere icmp parameter-problem /* generated for LXD network lxdbr0 */
ACCEPT icmp -- anywhere anywhere icmp time-exceeded /* generated for LXD network lxdbr0 */
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable /* generated for LXD network lxdbr0 */
ACCEPT tcp -- anywhere anywhere tcp spt:domain /* generated for LXD network lxdbr0 */
ACCEPT udp -- anywhere anywhere udp spt:domain /* generated for LXD network lxdbr0 */
ACCEPT udp -- anywhere anywhere udp spt:bootps /* generated for LXD network lxdbr0 */
InstanceServices all -- anywhere link-local/16
Chain InstanceServices (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 169.254.0.2 owner UID match root tcp dpt:iscsi-target /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.2.0/24 owner UID match root tcp dpt:iscsi-target /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.4.0/24 owner UID match root tcp dpt:iscsi-target /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.5.0/24 owner UID match root tcp dpt:iscsi-target /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.0.2 tcp dpt:http /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT udp -- anywhere 169.254.169.254 udp dpt:domain /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.169.254 tcp dpt:domain /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.0.3 owner UID match root tcp dpt:http /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.0.4 tcp dpt:http /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT tcp -- anywhere 169.254.169.254 tcp dpt:http /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT udp -- anywhere 169.254.169.254 udp dpt:bootps /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT udp -- anywhere 169.254.169.254 udp dpt:tftp /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
ACCEPT udp -- anywhere 169.254.169.254 udp dpt:ntp /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */
REJECT tcp -- anywhere link-local/16 tcp /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */ reject-with tcp-reset
REJECT udp -- anywhere link-local/16 udp /* See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule */ reject-with icmp-port-unreachable
Нет, так и должно быть. Лист блокировок в оперативной памяти в knot-resolver занимает почти 700 мегабайт.
See the Oracle-Provided Images section in the Oracle Cloud Infrastructure documentation for security impact of modifying or removing this rule
Я не знаю, где настраиваются эти правила, т.е. какая система используется для их начальной установки. Вам лучше прочитать документацию, как пишут в комментарии.
А чтобы решить проблему, скорее всего нужно разрешить пакеты на порт 1194 в цепочке INPUT. Но, опять же, делать это нужно в той системе, где заведены правила.
Спасибо за ответ!
Удалил все DNS серверы, кроме одного на роутере.
Возможно зря я дополнительные ipv6 DNS серверы прописывал.
Cпустя какое-то время заработало.
Непосредственно контейнер автоматически не обновляется, как и скрипты антизапрета в нём, однако обновления безопасности системных программ дистрибутива устанавливаются автоматически (unattended-upgrades).
Значимых обновлений с момента первого релиза контейнера не было. Если они будут, их придётся выполнить вручную, я напишу как.
Помогите пожалуйста настроить. На моменте
“lxc file pull antizapret-vpn/root/easy-rsa-ipsec/CLIENT_KEY/antizapret-client-tcp.ovpn antizapret-client-tcp.ovpn”
получаю ошибку (в первых сообщениях темы это обсуждалось):
Error: Not Found
Зашел в контейнер, а там так:
root@drfischer:~# systemctl status openvpn-generate-keys
Unit openvpn-generate-keys.service could not be found.
root@drfischer:~# sudo lxc exec antizapret-vpn bash
root@antizapret-vpn:~# systemctl status openvpn-generate-keys
● openvpn-generate-keys.service - antizapret-vpn generate keys
Loaded: loaded (/etc/systemd/system/openvpn-generate-keys.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-03-05 17:39:41 MSK; 26min ago
Process: 72 ExecStart=/root/easy-rsa-ipsec/generate.sh (code=exited, status=8)
Main PID: 72 (code=exited, status=8)
Mar 05 17:39:31 antizapret-vpn systemd[1]: Started antizapret-vpn generate keys.
Mar 05 17:39:41 antizapret-vpn generate.sh[72]: Can’t determine global IP address!
Mar 05 17:39:41 antizapret-vpn systemd[1]: openvpn-generate-keys.service: Main process exited, code=exited, status=8/n/a
Mar 05 17:39:41 antizapret-vpn systemd[1]: openvpn-generate-keys.service: Failed with result ‘exit-code’.
root@antizapret-vpn:~# /root/easy-rsa-ipsec/generate.sh
Can’t determine global IP address!
root@antizapret-vpn:~#
В контейнере комманда: systemctl status openvpn-generate-keys
openvpn-generate-keys.service - antizapret-vpn generate keys
Loaded: loaded (/etc/systemd/system/openvpn-generate-keys.service; enabled; v
endor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-03-05 19:54:42 M
SK; 2min 27s ago
Process: 72 ExecStart=/root/easy-rsa-ipsec/generate.sh (code=exited, s
tatus=8)
Main PID: 72 (code=exited, status=8)
Mar 05 19:54:30 antizapret-vpn systemd[1]: Started antizapret-vpn generate keys.
Mar 05 19:54:42 antizapret-vpn generate.sh[72]: Can’t determine global IP addres
s!
Mar 05 19:54:42 antizapret-vpn systemd[1]: openvpn-gener
ate-keys.service: Main process exited, code=exited, status=8/n/a
Mar 05 19:54:42 antizapret-vpn systemd[1]: openvpn-gener
ate-keys.service: Failed with result ‘exit-code’.
Сложно сказать, проверяйте правила firewall’а вашего дистрибутива, или те, что вы добавили вручную. LXD по умолчанию инициализирует сеть автоматически и с ним у меня проблем никогда не возникало, поэтому причину нужно искать в особых настройках сети конкретно у вас.