https://localhost:8443 works, but not from the out. [SOLVED]

Ask questions about Arch Linux ARM. Please search before making a new topic.

https://localhost:8443 works, but not from the out. [SOLVED]

Postby dobunzli » Mon Sep 10, 2018 11:03 am

Hello,

I have Arch Linux ARM installed on a raspberry pi.
I installed bitwarden_rs, a service that is listening on port 8443 and that is accessible via https.

If I enter https://localhost:8443 in my browser everything works well and the correct page is displayed.
If enter https://mydomainname:8443 the browser says that he was unable to establish a secure connexion.

On my router I forwarded the port 8443 to my raspberry pi. I also forwarded the port 22 and I am able to connect to my raspberry pi via ssh by using ssh myuser@mydomainname.

Firewall is disabled

How can I debug the situation further ?

See some commands below.

Thanks in advance for your suggestions

$this->bbcode_second_pass_code('', 'netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::5355 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:8443 :::* LISTEN
udp 0 0 127.0.0.53:53 0.0.0.0:*
udp 0 0 192.168.1.42:68 0.0.0.0:*
udp 0 0 0.0.0.0:5355 0.0.0.0:*
udp6 0 0 fe80::ba27:ebff:feb:546 :::*
udp6 0 0 :::5355 :::')

$this->bbcode_second_pass_code('', 'sudo iptables -nvL
[sudo] password for myuser:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination ')

$this->bbcode_second_pass_code('', '[myuser@archlinux ~]$ lynx -verbose https://mydomainname:8443

Looking up mydomainname
Making HTTPS connection to mydomainname
Alert!: Unable to connect to remote host.
lynx: Can't access startfile https://mydomainname:8443/')
Last edited by dobunzli on Mon Sep 10, 2018 5:40 pm, edited 2 times in total.
dobunzli
 
Posts: 5
Joined: Mon Sep 10, 2018 10:25 am

Re: https://localhost:8443 works, but not from the outside

Postby moonman » Mon Sep 10, 2018 3:30 pm

From your logs there is nothing listening on 8443 except ipv6 address. Set the ip in the config to the machine IP or 0.0.0.0 to bind to all Interfaces
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: https://localhost:8443 works, but not from the outside

Postby dobunzli » Mon Sep 10, 2018 3:55 pm

Thanks very much for pointing that out !
Before doing something wrong, can you tell me how to achieve this ?
Do I have to install and use "bind" ?
dobunzli
 
Posts: 5
Joined: Mon Sep 10, 2018 10:25 am

Re: https://localhost:8443 works, but not from the outside

Postby WarheadsSE » Mon Sep 10, 2018 4:11 pm

You have no need for "bind" package. You need to configure Bitwarden's listen address. It is currently only listening on `localhost`, which is `127.0.0.1` and `::1`. You will want to make it listen on `0.0.0.0` which tells the program to "bind" to port 8443 on any available IP address on the Pi.

As for `[myuser@archlinux ~]$ lynx -verbose https://mydomainname:8443`, this may not work from the Pi itself, unless you have hairpin NAT. Configure the first part (bind address), then try this and come back.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: https://localhost:8443 works, but not from the outside

Postby dobunzli » Mon Sep 10, 2018 5:39 pm

Making bitwarden listening on '0.0.0.0' solved the problem, even with lynx from the pi itself !

Thanks a lot for the support !
dobunzli
 
Posts: 5
Joined: Mon Sep 10, 2018 10:25 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 22 guests