Проблемы с WireGuard
Всем привет! Столкнулся с проблемой при настройке wireguard с использованием скрипта easy-wg-quick (ручками пробовал настраивать, все было также, так что проблема не в скрипте).
Сама проблема заключается в том, что подключение есть, пакеты интерфейс приходят, но при этом самого доступа в интернет нет. Может кто сможет указать в чем проблема?
tcpdump:
# tcpdump -i ens3 port 30329
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on ens3, link-type EN10MB (Ethernet), snapshot length 262144 bytes
18:35:48.795960 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:35:53.332491 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:35:58.551266 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:36:03.582010 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:36:08.590700 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:36:13.799693 IP <client_ip>.14341 > <host>.30329: UDP, length 148
18:36:18.892225 IP <client_ip>.14341 > <host>.30329: UDP, length 148
iptables:
# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:30329
ACCEPT udp -- anywhere anywhere udp dpt:ipsec-nat-t
ACCEPT udp -- anywhere anywhere udp dpt:isakmp
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT udp -- anywhere anywhere udp dpt:30329
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 ctstate NEW,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s ctstate NEW,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spt:30329
ACCEPT tcp -- anywhere anywhere tcp spt:smtp ctstate ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:imap2 ctstate ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:imaps ctstate ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:pop3 ctstate ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp spt:pop3s ctstate ESTABLISHED
# iptables -vnxL -t filter
Chain INPUT (policy ACCEPT 211492 packets, 162774643 bytes)
pkts bytes target prot opt in out source destination
85 14960 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:30329
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:30329
24526 1953027 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2902 121521 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
20073 2273861 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
7 348 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 ctstate NEW,ESTABLISHED
176 14643 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143 ctstate NEW,ESTABLISHED
1601 123142 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993 ctstate NEW,ESTABLISHED
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:110 ctstate NEW,ESTABLISHED
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:995 ctstate NEW,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- wghub * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * wghub 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 244231 packets, 144644696 bytes)
pkts bytes target prot opt in out source destination
4 251 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:25 ctstate ESTABLISHED
145 56943 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:143 ctstate ESTABLISHED
1709 225542 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:993 ctstate ESTABLISHED
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:110 ctstate ESTABLISHED
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:995 ctstate ESTABLISHED
# iptables -vnxL -t nat
Chain PREROUTING (policy ACCEPT 4582 packets, 238090 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 2678 packets, 119142 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 7597 packets, 463595 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 6390 packets, 383443 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * ens3 10.18.96.0/24 0.0.0.0/0
39 2915 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ens3 0.0.0.0/0 0.0.0.0/0
wg:
# wg show
interface: wghub
public key: rREdMvDekHjUwXeSieeLgHpA1ARoatNnSH3KcXmExG4=
private key: (hidden)
listening port: 30329
peer: tBv/YZaYfM1xRfQ17bKQLcL3jV4pVCH29lqFa6PlHiU=
preshared key: (hidden)
allowed ips: 10.219.11.10/32