TLS Setup

User avatar
Space_Balls
Posts: 3
Joined: Mon Jun 13, 2022 5:27 pm
Location: Denmark

TLS Setup

Post by Space_Balls »

Hello,
I've started a dedicated server for FS22 and I want it to use TLS for the web panel but I can't get it to work.
I have created an origin certificate with Cloudflare and linked the certificate in the "dedicatedServer.xml". It seems to work and when I go to mydomain.com:8443 everything seems fine until I try and log in. Then after I press the login button after entering my credentials it just resets the page.

What am I missing, and is there a way to get rid of the port at the end of my URL?
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: TLS Setup

Post by Dezza69 »

From memory; I removed sone of the references to the secondary certificates contained in the dedicated server xml (the one for the actual dedicated server in the exe folder, not the other one in your game save folder) and started it.

The server created the required certs, but they were self-signed, so I need to “trust” them when going to the https://ihavednssetup.andownmyowndomainname.com:8443/ webpage.

Edit:
Will paste/post example shortly…
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: TLS Setup

Post by Dezza69 »

Here's the code from my dedicatedServer.xml

This is the file located wherever the actual dedicatedserver.exe file is.

<tls port="8443" active="true">
<certificate>cert.pem</certificate>
<privatekey>pk.pem</privatekey>
<intermediateCertificates />
</tls>

Whenever the dedicated server restarts it generates a new certificate and I need to "trust" it again when going to the webpage.

Hope that helps.

Happy Farming!!!
User avatar
Space_Balls
Posts: 3
Joined: Mon Jun 13, 2022 5:27 pm
Location: Denmark

Re: TLS Setup

Post by Space_Balls »

That sadly doesn't help.
The problem is that I'm not using a self-signed certificate, I'm trying to use my own from Cloudflare.
But now it allows me to sign in but it says the certificate is not trusted because there's not enough information about the certificate
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: TLS Setup

Post by Dezza69 »

Space_Balls wrote: Thu Jun 16, 2022 10:29 am That sadly doesn't help.
The problem is that I'm not using a self-signed certificate, I'm trying to use my own from Cloudflare.
But now it allows me to sign in but it says the certificate is not trusted because there's not enough information about the certificate
Ok...

Also, if your browser isn't trusting the certificates isn't that possibly something with you needing to trust the cert with your browser/system?
User avatar
Space_Balls
Posts: 3
Joined: Mon Jun 13, 2022 5:27 pm
Location: Denmark

Re: TLS Setup

Post by Space_Balls »

Dezza69 wrote: Thu Jun 16, 2022 11:57 am
Space_Balls wrote: Thu Jun 16, 2022 10:29 am That sadly doesn't help.
The problem is that I'm not using a self-signed certificate, I'm trying to use my own from Cloudflare.
But now it allows me to sign in but it says the certificate is not trusted because there's not enough information about the certificate
Ok...

Also, if your browser isn't trusting the certificates isn't that possibly something with you needing to trust the cert with your browser/system?
Well it should be automatically trusted like this website.
User avatar
Dezza69
Posts: 375
Joined: Sun Aug 05, 2018 11:36 pm

Re: TLS Setup

Post by Dezza69 »

... that's if it is setup correctly.

I found that the personal dedicated server supplied with the game exe seemed to prefer using/creating it's own certificates (which were generated for the IP address and not a dns qualified name).

Which is why I posted the solution I found worked for me.

Hope you're able to get it sorted.
tp-ops
Posts: 2
Joined: Thu Oct 06, 2022 11:37 am

Re: TLS Setup

Post by tp-ops »

Space_Balls wrote: Mon Jun 13, 2022 5:38 pm Hello,
I've started a dedicated server for FS22 and I want it to use TLS for the web panel but I can't get it to work.
I have created an origin certificate with Cloudflare and linked the certificate in the "dedicatedServer.xml". It seems to work and when I go to mydomain.com:8443 everything seems fine until I try and log in. Then after I press the login button after entering my credentials it just resets the page.

What am I missing, and is there a way to get rid of the port at the end of my URL?
I have the same setup with the issue. Setup SSL through cloudflare edge and origin certificates. Everythings works fine execpt authentication is only refreshing the page when DNS Proxy is on at cloudflare DNS. When I turn off DNS Proxy, authentication works fine but then I receive a certification error, as exspected.

I know for sure evenrything with DNS, SSL en Cloudflare is setup wright. I have another server which is working fine with the same config.
I am a networkengineer so knowledge of these termologies isn't the problem but when it comes down to programming there is a tiny little bit of knowlegde.
JacoJazz
Posts: 1
Joined: Tue Sep 26, 2023 2:24 pm

Re: TLS Setup

Post by JacoJazz »

Did anyone manage to find a fix for this? Still having the exact same issues!
Flolingo
Posts: 1
Joined: Wed Feb 21, 2024 6:30 pm
Location: Austria

Re: TLS Setup

Post by Flolingo »

I have this issue too.
Post Reply