![]() ![]() ![]() ![]() ![]() Note: When creating the certificate, you will be asked for some information such as country and state, which you can enter whatever you like but when asked for “Common Name” you must enter the correct host name or IP address of your droplet (VPS).Īlso, enable Stunnel automatic startup by configuring the “/etc/default/stunnel4” file, enter command below to open the file in text editor: nano /etc/default/stunnel4įinally, restart Stunnel for configuration to take effect, using this command: /etc/init.d/stunnel4 restart Openssl req -new -x509 -key key.pem -out cert.pem -days 1095Ĭat key.pem cert.pem > /etc/stunnel/stunnel.pemīasically, the commands above is for creating a private key, creating a certificate using that key and combining the two of them into one files named “stunnel.pem” to use with Stunnel. Stunnel uses SSL certificate to secure its connections, which you can easily create using the OpenSSL package: openssl genrsa -out key.pem 2048 Note: The client = no part isn’t necessary, Stunnel by default is set to server mode. So overall the “nf” file must contain the lines below: client = no Squid proxy by default runs on localhost and port 3128 so we have to tell Stunnel to forward accepted connections to that port: Then depending on the service you’re going to use the secure tunnel on, you must specify the port and IP address of that in the configuration file Basically Stunnel takes packets from a secure port and then forwards it to the port and IP address of the service you specified. This can be any of the 65535 ports, as long as it’s not blocked by another service or firewall: We’ll explain how to install and configure Squid in Step 6.Īfter setting a name for the service you’re going to use, you must tell Stunnel to listen on which port for that service. Here as an example we’re going to secure traffics between Squid proxy server and a client using Stunnel. It can be any of the services which use networking such as mail server, proxy server, etc. Next we specify a service for use with Stunnel. We’re going to be using a SSL certificate to identify ourselves to the server so we have to set the path to that certificate in “nf” file using this line (We will create the certificate file in the next step): cert = /etc/stunnel/stunnel.pem These latter features may be used to override decisions made by apt-get's conflict resolution system.Stunnel configures itself using a file named “nf” which by default is located in “/etc/stunnel”.Ĭreate a “nf” file in the “/etc/stunnel” directory: nano /etc/stunnel/nf Similarly a plus sign can be used to designate a package to install. If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. The /etc/apt/sources.list file is used to locate the desired packages. All packages required by the package(s) specified for installation will also be retrieved and installed. Each package is a package name, not a fully qualified filename. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.Īpt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library.Īpt-get install is followed by one or more packages desired for installation or upgrading. More information about install using apt-getĪdvanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu and other Linux distributions. You may safely remove this package after the upgrade. This is a dummy package to ease upgrading to stunnel4. Stunnel version 3 has been removed from Debian. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |