InterLinked1 / lbbs

Lightweight BBS For Linux - Bulletin Board System server software
GNU General Public License v2.0
35 stars 4 forks source link

Set cap ssl not working #1

Closed lostfile1 closed 1 year ago

lostfile1 commented 1 year ago

I'll show you some screenshots of the log later, but I'm having problems with pointing it at an SSL certificate and a few other module errors.

InterLinked1 commented 1 year ago

Thanks for reporting an issue. Which module is this with, door_irc, I'm assuming? There's an IRC server module in development for the BBS, but it hasn't been released yet.

door_irc uses the lirc library under the hood (https://github.com/InterLinked1/lirc). It seems to always complain about the SSL certificate if you set verify on (something with OpenSSL), but it should successfully connect.

Please provide log messages with debug to proceed further.

lostfile1 commented 1 year ago

Oh no! It has to do with the http server also, the ssh server seems to fail to load it can't find any keys

InterLinked1 commented 1 year ago

The SSH server and HTTP server are two separate modules; the latter uses SSL configuration configured in tls.conf.

You will need to explicitly specify your keys there or it won't work. There are no default keys that are used. Same for SSH but in net_ssh.conf.

SSH has some settings you can adjust in net_ssh.conf if it doesn't like certain keys (I had to disable DSA on mine).

If you're getting errors or having other issues, we really need logs to proceed further. Set the debug level to 10 and please send the relevant output from /var/log/lbbs/bbs.log

lostfile1 commented 1 year ago

I know I copied the SSL keys from my truecrypt folder and gave them user privileges put them in a folder and pointed the tls.conf at it

InterLinked1 commented 1 year ago

Sorry, we'll really need to see your configuration and the actual log messages to assist further.

lostfile1 commented 1 year ago

heres the log file bbs.log

lostfile1 commented 1 year ago

heres my hole /etc/lbbs folder with out the cert files and a few things where changed so i dont leak my database password lbbs.zip

InterLinked1 commented 1 year ago

What is the output of:

ls -la /etc/ssh/ssh_host_rsa_key
ls -la /etc/ssh/ssh_host_ecdsa_key

The BBS isn't able to read the keys, which is why the SSH daemon fails to start.

lostfile1 commented 1 year ago

-rw------- 1 root root 2602 Jan 30 21:04 /etc/ssh/ssh_host_rsa_key

oh i think i see the problem im gonna change the perms and see if that will fix it

lostfile1 commented 1 year ago

nope same problem

InterLinked1 commented 1 year ago

The permissions in the above output don't allow the BBS user to read the key file. Have you tried something like chmod +r /etc/ssh/ssh_host_rsa_key? You could also try making the keys owned by the BBS user: chown bbs /etc/ssh/ssh_host_rsa_key (assuming the BBS run user is bbs.

If that's still not working, I need fresh logs and the output of the above commands again.

lostfile1 commented 1 year ago

it worked after runing it a few times

lostfile1 commented 1 year ago

ERROR[2190]: mod_mysql.c:273 sql_stmt_fetch: SQL STMT fetch failed: Commands out of sync; you can't run this command now

it works but i noiced that error WARNING[2246]: net_http.c:369 parse_header: Unknown HTTP request method: ��e�>^��-0���.�`V��x"ݐku��ˁ��,�P�m�-M��)�#eM����s�2�광˂� +�z=������FS.��I and this one wile trying to connect to the https server

lostfile1 commented 1 year ago

here try loging into ssh brokenserver.ddns.net port 224 i need to add more menus and stuff but im going to leave it up for now for testing

InterLinked1 commented 1 year ago

I've been noticing that mod_mysql error too recently. I will look into it at some point, but as far as I can tell, functionality wise, everything is fine. You can ignore that for now.

Was the second request actually from you making an HTTPS request yourself? There could be an issue with HTTPS, if HTTP works fine for you.

Your server doesn't seem to respond for me but glad it's coming along for you!

lostfile1 commented 1 year ago

i think it might have crashed but yes i made the https request myself

InterLinked1 commented 1 year ago

If it crashed, then a backtrace is also needed. You can use the bbs_dumper script to do that, assuming you started the BBS with the -g option before it crashed.

lostfile1 commented 1 year ago

thanks for the tip

lostfile1 commented 1 year ago

ERROR[10517]: tls.c:111 ssl_new_accept: SSL error -1: 1 (SSL_ERROR_SSL = error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca)