Site A <-> IPsec tunnel <-> Site B
The deluge we were troubleshooting was in Site B and all its traffic goes through the tunnel to Site A and eventually to the Internet. This is working just fine for everything except for the Notifications in deluge which, for the life of me, I couldn't figure out why. TLS does not break when traversing a VPN tunnel. Even though IPsec is technically UDP it encapsulates the TCP packets that traverse it anyway. And to prove that, I don't have any problems browsing the Internet from a device in Site B that has all its traffic going through the tunnel to Site A. This is a very common setup for a main office/branch office company (mine are just two homes connected to each other though). So I'm still baffled as to why it's not working before.
For the heck of it, I did the python3 test you had for me and look how different the results are this time:
Code: Select all
>>> from smtplib import SMTP
>>> user="redacted"
>>> pw="redacted"
>>> server = SMTP('smtp.gmail.com', 587)
>>> server.set_debuglevel(1)
>>> server.ehlo()
send: 'ehlo [192.168.20.101]\r\n'
reply: b'250-smtp.gmail.com at your service, [redacted]\r\n'
reply: b'250-SIZE 35882577\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-STARTTLS\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-CHUNKING\r\n'
reply: b'250 SMTPUTF8\r\n'
reply: retcode (250); Msg: b'smtp.gmail.com at your service, [redacted]\nSIZE 35882577\n8BITMIME\nSTARTTLS\nENHANCEDSTATUSCODES\nPIPELINING\nCHUNKING\nSMTPUTF8'
(250, b'smtp.gmail.com at your service, [redacted]\nSIZE 35882577\n8BITMIME\nSTARTTLS\nENHANCEDSTATUSCODES\nPIPELINING\nCHUNKING\nSMTPUTF8')
>>> server.starttls()
send: 'STARTTLS\r\n'
reply: b'220 2.0.0 Ready to start TLS\r\n'
reply: retcode (220); Msg: b'2.0.0 Ready to start TLS'
(220, b'2.0.0 Ready to start TLS')
>>> server.login(user,pw)
send: 'ehlo [192.168.20.101]\r\n'
reply: b'250-smtp.gmail.com at your service, [redacted]\r\n'
reply: b'250-SIZE 35882577\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-CHUNKING\r\n'
reply: b'250 SMTPUTF8\r\n'
reply: retcode (250); Msg: b'smtp.gmail.com at your service, [redacted]\nSIZE 35882577\n8BITMIME\nAUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\nENHANCEDSTATUSCODES\nPIPELINING\nCHUNKING\nSMTPUTF8'
send: 'AUTH PLAIN AGtldmluZGQ5OTIwMDJAZ21haWwuY29tAERyZWFtY2FzdDA5MjExOTg3\r\n'
reply: b'235 2.7.0 Accepted\r\n'
reply: retcode (235); Msg: b'2.7.0 Accepted'
(235, b'2.7.0 Accepted')
>>> server.sendmail(user, user, "test")
send: 'mail FROM:<kevindd992002@gmail.com> size=4\r\n'
reply: b'250 2.1.0 OK gf23sm6846481pjb.48 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.1.0 OK gf23sm6846481pjb.48 - gsmtp'
send: 'rcpt TO:<kevindd992002@gmail.com>\r\n'
reply: b'250 2.1.5 OK gf23sm6846481pjb.48 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.1.5 OK gf23sm6846481pjb.48 - gsmtp'
send: 'data\r\n'
reply: b'354 Go ahead gf23sm6846481pjb.48 - gsmtp\r\n'
reply: retcode (354); Msg: b'Go ahead gf23sm6846481pjb.48 - gsmtp'
data: (354, b'Go ahead gf23sm6846481pjb.48 - gsmtp')
send: b'test\r\n.\r\n'
reply: b'250 2.0.0 OK 1610368675 gf23sm6846481pjb.48 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.0.0 OK 1610368675 gf23sm6846481pjb.48 - gsmtp'
data: (250, b'2.0.0 OK 1610368675 gf23sm6846481pjb.48 - gsmtp')
{}
>>> server.quit()
send: 'quit\r\n'
reply: b'221 2.0.0 closing connection gf23sm6846481pjb.48 - gsmtp\r\n'
reply: retcode (221); Msg: b'2.0.0 closing connection gf23sm6846481pjb.48 - gsmtp'
(221, b'2.0.0 closing connection gf23sm6846481pjb.48 - gsmtp')