SQLitening Support Forum

SQLitening Support => You've got Questions? We've got Answers! => Topic started by: Fredrick Ughimi on November 21, 2019, 06:35:12 am

Title: Would This Work?
Post by: Fredrick Ughimi on November 21, 2019, 06:35:12 am
Hello,

Just wondering if SQLitening can be used on a LAN and at the same time over the Internet. I imagine a scenario where users (staff) use the SQLitening Application on a LAN while the Boss accesses or uses the application over the Internet from a remote location.

Any ideas? Thanks.
Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 23, 2019, 10:37:34 am
I know there are security concerns using SQLitening over the Internet. Would using SocketTools with SQLitening solve the security issues?
Title: Re: Would This Work?
Post by: cj on November 24, 2019, 09:57:48 am
If using the server everyone can share the server without a problem.
I've read many reasons on the SQLite site why not to use SQLite peer to peer.

I am sure TLS with SocketTools would work by modifying the client and server code, but
the server would require a certificate.  I noticed SocketTools added some encryption
code, but that isn't unique to SocketTools. If you create your own certificates is
not suggested, but talking to SocketTools they might be interested.
It would be easy for them.



Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 24, 2019, 12:21:59 pm
Hello CJ,

Thank you for your response.

>>If using the server everyone can share the server without a problem.

Yes I intend to use the server.

The question is how to physically connect the server computer to the client computers. We have 11 remote locations that would want to connect to the server over the internet and 8 client computers that would be connected to server on a LAN since they are in the same building with the server computer.

Best regards.
Title: Re: Would This Work?
Post by: cj on November 24, 2019, 07:40:45 pm
SQLiteningServer.Cfg:
Port=51234
Hosts=192.168.0.2

Logins using slConnect:
The local computers connect to the local IP address or machine name and port of the server.
The remote computers connect to the remote IP address and port of the server.

Router:
The router needs to forward the local IP address and port to the server machine.
The IP address at command prompt of server: Type IPCONFIG  it is the IPV4 address.
I would use the address reservation page of the router to lock in the IP address of the server
so it never changes if the network is rebooted.

Windows Firewall:

SQLiteningServer.exe needs to be added to "Allow an app through the firewall."

Shortcuts:
Mark "Run as Administrator" to SqliteningServer.exe and SqliteningServerAdmin.exe

SQLitening is not secure over the internet.  Connections are not encrypted or authenticated.

CubeSQL seems to be a lot like SQLitening and uses JSON.  It might be an option.
https://sqlabs.com/cubesql

SQLTools might also be an option to consider and use another SQL.



Test server with 12 connections by using threads

#INCLUDE "win32api.inc"
#INCLUDE "sqlitening.inc"
GLOBAL gs() AS STRING
FUNCTION PBMAIN () AS LONG
 LOCAL x,hThread AS LONG
 DIM gs(12) 'each user puts recordset into an element
 FOR x = 1 TO UBOUND(gs)
  THREAD CREATE MyThread(x) TO hthread
  THREAD CLOSE hThread TO hThread
 NEXT
 DO:SLEEP 50:LOOP UNTIL THREADCOUNT=1
 ? JOIN$(gs(),$CR)
END FUNCTION

THREAD FUNCTION MyThread(BYVAL Num AS LONG) AS LONG
 DIM s() AS STRING
 slConnect "192.168.0.2",51234
 slOpen "sample.db3"
 slselary "select rowid,redref from parts where rowid=" + STR$(Num),s(),"Q9c"
 gs(Num) = JOIN$(s(),$CR)  'put into array
 slDisconnect
END FUNCTION
Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 25, 2019, 08:26:38 am
Hello CJ,

Thanks. This is quite useful

I would try it out in a couple of days time.
Title: Dedicated VPN
Post by: cj on November 27, 2019, 11:53:57 am
I am using a VPN service and can connect to the SQLitening server only if using the same dedicated VPN server.

I don't know if a person using the same VPN service could connect to the server from another account or if they need my username and password?
I have sent an email to the VPN service.

Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 28, 2019, 05:05:19 am
Hello CJ,

That is interesting. I would like to try it out from here.
Title: Re: Would This Work?
Post by: cj on November 28, 2019, 09:54:28 am
From NordVPN:

Business packages start from 5 annual accounts.

Regarding connectivity, yes, you can connect from anywhere in the world to a particular country of our shared servers. You can also purchase a Dedicated server to have one static IP that is not shared between anyone but your team, which you can assign particular users to it and use it per your preferences.

We also have a Back Friday deal going on this very week, if you make a purchase until the end of it.

We could add AES256 to SQLitening's TCP routines.
Title: Re: Would This Work?
Post by: cj on November 28, 2019, 09:59:41 am
From NordVPN:

If you were to purchase this very week, we can offer the following pricing:

Advanced NordVPN Teams package for 75 USD/ user along with a Dedicated gateway/ server for 336 USD for a year.





This at least shows one way to go.
I always thought that routers could be setup or flashed to connect securely to each other?
Title: Re: Would This Work?
Post by: cj on November 28, 2019, 10:38:39 am
Another way to go would be to install a VPN server.  I would still encrypt the TCP sends and receives.
It is amazing that I can't find much information on people doing this.  Looking in the wrong places.

https://www.howtogeek.com/135996/how-to-create-a-vpn-server-on-your-windows-computer-without-installing-any-software/

I would definitely check this inexpensive route with Hamachi that installs as a service.
Free up to 5 users, $49 a year for 32 users.
https://vpn.net/

https://www.vpnmentor.com/reviews/logmein-hamachi/


Other VPN's to compare to:
https://vpnpro.com/vpn-solutions/logmein-hamachi-review/

https://beebom.com/hamachi-alternatives/
Title: Re: Would This Work?
Post by: cj on November 28, 2019, 05:19:42 pm
NordVPN has a feature called Internet Kill switch.
The SQLitening server can't be accessed while it is on.

Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 28, 2019, 06:40:04 pm
Thanks CJ,

>>Free up to 5 users, $49 a year for 32 users.

I would like to test the free package for 5 users first before purchase.

I am downloading Hamachi from https://vpn.net/
Title: Re: Would This Work?
Post by: cj on November 28, 2019, 08:33:09 pm
I will do the same.
Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 29, 2019, 02:39:30 am
I was able to sign in and completed downloading and installation. I could not see any help or tutorial file, just the community forum. I did a search for 'getting started' and tutorial and could not anything useful.

Is it that easy that there is no need for the help or tutorial file?
Title: Re: Would This Work?
Post by: cj on November 29, 2019, 03:03:15 am
I will look into it later today.
NordVPN worked great.
I don't like the price of the dedicated server.
I will also add AES256 to SQLitening TCP within a few days.


Title: Re: Would This Work?
Post by: Fredrick Ughimi on November 29, 2019, 06:10:38 am
Hi CJ,

>>I will also add AES256 to SQLitening TCP within a few days.

That will be great.

>>NordVPN worked great.

Were you able to test without payment. Do they have a trial version? Anyway let's see how Hamachi goes.
Title: Re: Would This Work?
Post by: cj on November 29, 2019, 12:33:39 pm
Paid NordVPN connected with a couple machines using same username/password on one of their servers marked as allowing dedicated connections.  Might break terms of service or not work with more machines.
Title: Re: Would This Work?
Post by: cj on December 01, 2019, 03:40:23 pm
Windows 10 has a built-in VPN server, but I couldn't connect.
Some on the internet say there is a problem introduced in a Windows update.
https://pureinfotech.com/setup-vpn-server-windows-10/

I got Hamachi to connect, but didn't go any further.

I'll go back to encrypting the TCP data being transmit to the server.
Title: Re: Would This Work?
Post by: Fredrick Ughimi on December 02, 2019, 11:40:01 am
Hello CJ,

>>I got Hamachi to connect, but didn't go any further.

How did you do it?
Title: Re: Would This Work?
Post by: cj on December 02, 2019, 11:55:06 am
https://help.logmein.com/pkb_Home?q=share%20a%20port&l=en_US&c=products%3Almihamachi2&atype=FAQ__kav

It looks like you share a folder and use Windows mapping.
I only connected 2 machines and used chat.
I didn't use SQLite with it.
There are links to PDF files at the bottom of their home page.
Many use it so there must be better docs on the net, don't know where.
Title: Re: Would This Work?
Post by: cj on December 03, 2019, 12:52:55 am
Very interesting read:
https://proprivacy.com/vpn/comparison/nigeria-vpn

I have been successfully using SQLitening over a VPN between machines that share the exact same dedicated VPN server using the same user name and password.  This might be the best way to go if this is allowed.
I paid nothing extra and didn't need any dedicated IP address (other then share same exact server.)

I will finally have time to work on encrypting SQLitening on 12/3.
Title: Re: Would This Work?
Post by: Fredrick Ughimi on December 03, 2019, 11:05:56 am
>>Very interesting read:
https://proprivacy.com/vpn/comparison/nigeria-vpn

Thanks for the link. Interesting read.