V
V
Vasily2022-04-21 16:21:52
linux
Vasily, 2022-04-21 16:21:52

Why ubuntu wireguard won't let smtp connect?

Kotany, such a disaster:
Ubuntu 20.04.3 LTS
Two days ago I installed wireguard on a freshly installed system, made the settings with a script, when connected to the Internet, it only goes through the vpn channel, the sites work, the mail web interface works. But when setting up thunderbird, letters are only received, not sent. Yandex, google, and your hosting - letters do not leave any mail, they only come. In Linux, I am at the level of a button coding, so tell me how to catch the error, and what else is required to help with the diagnosis.
It's not about a specific PC, since from three different PCs connected to one server, the connection fails, you turn off the tunnel - everything is ok.
The SMTP server itself is pinged when the tunnel is enabled. While I thought that it was a matter of hosting, I wrote to support, threw off letters, tracing, they dug up nothing. I am 99.9% sure that the problem is in the server itself, with wireguard.

wireguard client allowed ips:
AllowedIPs = 0.0.0.0/1, 128.0.0.0/1, ::/1, 8000::/1

~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt ​​source destination

Chain FORWARD (policy ACCEPT )
target prot opt ​​source destination
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt ​​source destination

telnet connected to check, according to the instructions of the mail hosting, the connection is normal
~# telnet smtp.beget.com 2525
Trying 185.78.30.58...
Connected to smtp.beget.com.
Escape character is '^]'.
220 smtp.beget.com

[email protected]:~# traceroute smtp.beget.com
traceroute to smtp.beget.com (185.78.30.58), 30 hops max, 2525 byte packets
1 gw92.ruweb.net (185.12.92.1) 1.092 MS 0.964 ms 0.942 ms
2 185.229.8.85 (185.229.8.85) 0.649 ms 0.860 ms 0.770 ms
3 folga-gw-citytelecom.ru (89.188.117) 0.797 ms 0.743 ms 0.732 ms
4 10.10.13.13 8.248ms 8.222ms
5 * * *
6 10.0.14.17 (10.0.14.17) 8.982ms 8.997ms 8.993ms
7 * * *
8 smtp.beget.com (185.78.30.58) 9.170 ms 9.129 ms 9.219 ms
tracing is also ok

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2022-04-21
@snaiper04ek

show what's on the server in NAT
iptables -t nat -L POSTROUTING -vnx
+ some hosting providers cut SMTP traffic, but since you talked to them, then probably not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question