Install stunnel on ubuntu
Open the terminal and run the following command
sudo apt-get install stunnel4
Configure stunnel
First we need to enable stunnel
Enabling stunnel
$ vi /etc/default/stunnel4
Change the line,
ENABLED=0
to
ENABLED=1
Save and exit the file
Create your certificate with openssl (Optional)
$ openssl req -new -out mail.pem -keyout mail.pem -nodes -x509 -days 365
Where ever your /etc/stunnel/stunnel.conf file is pointing to mail.pem is where you should put this file. Mine points to /etc/stunnel/mail.pem.
Start your stunnel server
$ sudo /etc/init.d/stunnel4 start
If you get an error like You should check that you have specified the pid= in you configuration file, open up /etc/stunnel/stunnel.conf and comment out these services that may be enabled by default.
;[pop3s]
;accept = 995
;connect = 110
;[imaps]
;accept = 993
;connect = 143
;[ssmtp]
;accept = 465
;connect = 25
Example of setting up remote desktop for stunnel
Edit your /etc/stunnel/stunnel.conf.
Add the contents,
[rdp]
accept = 2000
connect = 192.168.2.10:7422
and uncomment the line that says ;client = yes. This should be done on the client side. Restart stunnel: /etc/init.d/stunnel4 restart.
Note:- My SSH server port configured on 7422
The accept variable (port) can be anything. The connect variable should be the host you are trying to connect to with
appended to it.
On the server side, you would do something similar. Just add to your stunnel.conf
[rdp]
accept = 22
connect = 3389
and start the stunnel server.
$ sudo /etc/init.d/stunnel4 start
Now we need to connect to the remote desktop. On the client, since we set the accept port to 2000 and mapped that to 192.168.2.10:7422 the server, we will connect to the remote desktop server from the client itself. Just issue the command,
$ rdesktop localhost:2000
This looks in the stunnel.conf on the client side, finds the service that accepts port 2000, and then actually performs the connect which is to host 192.168.2.10 on port 7422. On the server end, stunnel gets a request on port 22 and says to actually connect to port 3389, the one remote desktop is running on.
Penjelasan Materi Lainnya
Biografi Singkat Ibnu Sina - Riwayat dan Kehidupan
Biografi Ibnu Sina. Ibnu Sina merupakan doktor Islam yang ulung. Sumbangannya dalam bidang medis bukan saja diakui oleh dunia Islam tetapi juga oleh para sarjana Barat. Nama Ibnu Sina ialah Abu Ali al-Hussain Ibnu Abdullah. Tetapi di Barat, beliau le...
Jenis-Jenis Sejarah - Contoh dan Macam-macam Sejarah
Berikut adalah beberapa Jenis Sejarah:1. Sejarah IntelektualSejarah intelektual ialah sejarah pemikiran bersifat tematik. Bidang sejarah intelektual ini telah lama ada pada zaman Greek yang bertumpu kepada aspek- aspek agama seperti Kristian dan Isla...
Sejarah sebagai Ilmu - Pengertian dan Definisi
Sejarah sebagai ilmu. Ismaun menyatakan bahwa sejarah sebagai ilmu adalah suatu susunan pengetahuan (a body of knowledge) tentang peristiwa dan cerita yang terjadi di dalam masyarakat manusia pada masa lampau yang disusun secara sistematis dan metodi...
Biodata Singkat RA. Kartini - Pahlawan Perempuan
Biodata Kartini. Habis Gelap Terbitlah Terang, itulah judul buku dari kumpulan surat-surat Raden Ajeng Kartini yang terkenal. Surat-surat yang dituliskan kepada sahabat-sahabatnya di negeri Belanda itu kemudian menjadi bukti betapa besarnya keinginan...
Sejarah sebagai Kisah - Pengertian, Definisi dan Contoh
R. Moh. Ali dalam Ismaun menyatakan sejarah sebagai kisah ialah cerita berupa narasi yang disusun dari memori, kesan atau tafsiran manusia terhadap kejadian- kejadian atau peristiwa yang terjadi atau berlangsung pada waktu yang lampau. ...
0 comments:
Post a Comment