Solved [BitWarden RS] Container not able to resolve names (maybe more general network issue)

Currently reading
Solved [BitWarden RS] Container not able to resolve names (maybe more general network issue)

130
36
NAS
DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
Operating system
  1. Windows
Mobile operating system
  1. Android
Hi there,

I have set up a self hosted BitWarden_RS with docker and everything runs pretty good except notification mails (from the start).
This BitWarden was only accessed by me at first so not being able to send mails did not bother me but I was planning on giving access to some members of my family and maybe a few friends to manage their passwords and in this case this would be better if the mails worked.
So I tried to find a way to get the mails working and until now I did not get them to work.

I then decided to start all over again with the installation following @Rusty 's great tutorial. Everything is fine again except mails...
After some tests and troubleshooting, it appears that my container is not able to resolve the names and worst even with replacing the smtp host with its IP, I still don't recieve the mails so this might not be only a name resolution problem.

I have already started to get help from people on this forum starting there for the history but now here is my own topic :)

Any help getting everything sorted would be great :)

Thanks.
 
130
36
NAS
DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
Operating system
  1. Windows
Mobile operating system
  1. Android
Starting from where it stopped on the other topic, as suggested by @Rusty , I have replaced the smtp fqdn with its IP and tried to "verify email"



After pushing the "Send Email" button it started loading and then a pop-up confirmed that the mail was sent but I still did not recieve any mail.

I checked the logs in container and here's the output :
Code:
[2019-12-04 19:33:23][rocket::rocket][INFO] POST /api/accounts/verify-email:
[2019-12-04 19:33:23][_][INFO] Matched: POST /api/accounts/verify-email (post_verify_email)
[2019-12-04 19:33:39][bitwarden_rs::api::core::accounts][ERROR] Error sending delete account email: Error sending email. connection timed out

I tried to install the iptools to troubleshoot but ... :
Code:
[email protected]:/# apt-get update                                                                                                   
Err:1 http://security.debian.org/debian-security buster/updates InRelease                                                           
  Temporary failure resolving 'security.debian.org'                                                                                 
Err:2 http://deb.debian.org/debian buster InRelease                                                                                 
  Temporary failure resolving 'deb.debian.org'                                                                                       
Err:3 http://deb.debian.org/debian buster-updates InRelease                                                                         
  Temporary failure resolving 'deb.debian.org'                                                                                       
Reading package lists... Done                                                                                                       
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'                 
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.d
ebian.org'                                                                                                                           
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'         
W: Some index files failed to download. They have been ignored, or old ones used instead.

I also tried to check with netshoot upon the advice of @one-eyed-king and here are the outputs :
Code:
🐳  → ping smtp.gmail.com
ping: smtp.gmail.com: Try again

🐳  → nslookup smtp.gmail.com
;; connection timed out; no servers could be reached

🐳  → ping 74.125.140.109
PING 74.125.140.109 (74.125.140.109) 56(84) bytes of data.
^C
--- 74.125.140.109 ping statistics ---
207 packets transmitted, 0 received, 100% packet loss, time 213ms

Not really sure what's going wrong but it looks like my container is not able to network if I can say so...

Not sure what to do next as all these steps failed
 
Can you disable your firewall and re-do the test with netshoot?

If this doesn't help... did you create a dedicated docker network from the ui and assinged the bitwarden container to it? If "Disable IP Masquaring" is checked, egress traffic from the container network to the host will be blocked... If so, uncheck it and re-do the test.
 
130
36
NAS
DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
Operating system
  1. Windows
Mobile operating system
  1. Android
Okay ... firewall issue :D
Code:
🐳  → nslookup smtp.gmail.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   smtp.gmail.com
Address: 64.233.167.108
Name:   smtp.gmail.com
Address: 2a00:1450:400c:c0a::6c
Now I need to find out which rule is blocking me...
 
Hint: docker networks appear like foreign networks. Docker0 and the default bridge network usualy registeres for the CIDR 172.17.0.0/16. You might want to whitelist it for incomming traffic. No worries, this is private class b network, which is not routed thru the internet - thus, there will be never any traffic comming from the internet having one of the ips of that range.
 
130
36
NAS
DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
Operating system
  1. Windows
Mobile operating system
  1. Android
@one-eyed-king , I have added this rule and re-enabled the firewall and nslookup in netshoot is OK :D
I was even able to install iputils-ping
Let's see now if the mails are coming :)

Thanks
 
130
36
NAS
DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
Operating system
  1. Windows
Mobile operating system
  1. Android

Rusty

Moderator
NAS Support
2,816
862
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Damn firewalls, who needs them ;). Glad you got this resolved.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Top