Sunday, April 1, 2012

cara menggunakan Stunnel - aplikasi pengaturan SSL untuk network daemons

The stunnel program is designed to work as an SSL encryption wrapper between remote client and local (inetd-startable) or remote server. It can be used to add SSL functionality to commonly used inetd daemons like POP2, POP3, and IMAP servers without any changes in the programs’ code. Stunnel uses OpenSSL libraries for cryptography, so it supports whatever cryptographic algorithms you compiled into your library.

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

Cara Lancar bahasa inggris tanpa kursus - otodidak
ada kelebihan dan kelemahan dlm belajar b. inggris secara otodidak. cuma caranya harus betul. karna kalau kursus ada yg mengarahkan. tapi kalau ini kamu harus punya buku tenses (contoh simple present tense, simple past tense, yg kayak gitu deh), kamu...
Tugas Seksi Konsumsi Dalam Organisasi
Tugasnya bagian konsumsi yang pasti mempersiapkan konsumsi atau dengan kata lain nyediain makanan, Klo mau dijabarin lebih panjang lagi tugas nya tu kayak gini:1. perhitungkan berapa jumlah tamu yg akan di undang2. pastikan makanan yg bakal d sediain...
Rumus keliling Mencari Diameter Lngkaran
Berikut adalah rumus keliling mencari diameter lingkaranK = phi x Dcth :: keliling dr diameter 14 adalah...Jwb :: K = phi x DK = 22/7 x 14K = 308/7K = 44jadi ,keliling ny adl 44 cm22/7 dpt krn 14 bs di bgi 7, kalo gak bs di bgi 7, brarti harus dikali...
Air kolam berwarna hijau - mengatasi
Untuk mengatasi air kolam yang berubah menjadi warna hijau pada kolam  perlu dicari sebab utamanya. Ada beberapa kondisi ideal yang memungkinkan algae tumbuh dan berkembang dengan baik. Karena itu solusi untuk mengatasinya adalah mengurangi atau meng...
Fisika Gerak Melingkar - Pengertian dan contoh soal
1. GERAK MELINGKAR BERATURAN (GMB)GMB adalah gerak melingkar dengan kecepatan sudut (w) tetap.Arah kecepatan linier v selalu menyinggung lintasan, jadi sama dengan arah kecepatan tangensial sedanghan besar kecepatan v selalu tetap (karena w tetap). A...


0 comments:

Post a Comment

 

Profil Penulis Blog Ini

Penulis merupakan mahasiswa aktif Fakultas Teknik Universitas Syiah Kuala dan Merupakan Anggota dari komunitas IloveAceh --> @iloveaceh

Hubungi Kami Di Sini

WhatsApp:6289694269436
YM:erix_funky
Skype:ilmusains7

Copyright © 2025 Pengertian - Materi Belajar Online Design by BTDesigner | Blogger Theme by BTDesigner | Powered by Blogger