[POPS] Securing POP3, QPOPPER with SSL/TLS - OpenSSL on port 995
Posted by admin on 19th August 2010
A. Create Directory for Certificate
[root@ipv6]# cd /etc/mail
[root@ipv6 /etc/mail]# ls
Makefile aliases.db freebsd.submit.mc mailertable.sample virtusertable.sample
README freebsd.cf helpfile sendmail.cf
access.sample freebsd.mc mailer.conf spamassassin
aliases freebsd.submit.cf mailer.conf.old submit.cf
[root@ipv6 /etc/mail]# mkdir -p -m555 certs
[root@ipv6 /etc/mail]# chown root:mail certs
[root@ipv6 /etc/mail]# chmod 550 certs
B. Locate OpenSSL
[root@ipv6 /etc/mail]# locate ssl
/etc/ssl
/etc/ssl/openssl.cnf
/usr/bin/openssl
C. Generate RSA Key with file name ipv6indonet.ppm using openSSL
[root@ipv6 /etc/mail/certs]# /usr/bin/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout ipv6indonet.pem -out ipv6indonet.pem
Generating a 1024 bit RSA private key
………………..++++++
………++++++
writing new private key to ‘ipv6indonet.pem’
—–
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [AU]:ID
State or Province Name (full name) [Some-State]:DKI
Locality Name (eg, city) []:Jakarta
Organization Name (eg, company) [Internet Widgits Pty Ltd]:NOC
Organizational Unit Name (eg, section) []:Noc_Noc
Common Name (eg, YOUR name) []:demolitionman
Email Address []:demolitionman@localhost
[root@ipv6 /etc/mail]# chmod 500 certs/cert.pem
[root@ipv6 /etc/mail]# chown root:0 certs/cert.pem
[root@ipv6 /etc/mail]# cat ipv6indonet.pem >> certs/cert.pem
D. Create qpopper file configuration
[root@ipv6 /var/log]# vi /etc/mail/qpopper.config
set tls-support = alternate-port
set tls-version = default
set tls-server-cert-file = /etc/mail/certs/ipv6indonet.pem
E. Change/Add option for Inetd Qpopper to load ’secured’ qpopper.config
Change pop3 to pop3s [unless the config would not work]
[root@ipv6 /var/log]# vi /etc/inetd.conf
pop3s stream tcp6 nowait root /usr/local/sbin/popper popper -l1 -f /etc/mail/qpopper.config
pop3s stream tcp nowait root /usr/local/sbin/popper popper -l1 -f /etc/mail/qpopper.config
F. Restart INETD
[root@ipv6 /var/log]# killall -9 inetd
[root@ipv6 /var/log]# /usr/sbin/inetd
[root@ipv6 /var/log]# telnet 202.159.33.33 110
Trying 202.159.33.33…
telnet: connect to address 202.159.33.33: Connection refused
telnet: Unable to connect to remote host
[root@ipv6 /var/log]# telnet 202.159.33.33 995
Trying 202.159.33.33…
Connected to ipv6.indo.net.id.
Escape character is ‘^]’.
^]
telnet> quit
Connection closed.
[root@ipv6 /var/log]# telnet 2404:170:33::33 995
Trying 2404:170:33::33…
Connected to 2404:170:33::33.
Escape character is ‘^]’.
quit
^CConnection closed by foreign host.
IPv6 also listening on port 995
a. rahman isnaini r.sutan
Powered by Um Geir.
Posted in Mail, security | No Comments »












Anonymous said…