store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Thu May 23, 2013 1:28 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 
Author Message
 Post subject: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Mon Jul 02, 2012 10:46 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
is it possible to have WAF also protect the Virtualmin miniserv running on port 10000?

thanks

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Mon Jul 02, 2012 1:54 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Thanks for the question, yes indeed thats exactly what its built to do. Just follow the documentation here to set it up:

https://www.atomicorp.com/wiki/index.php/ASL_WAF#local

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Mon Jul 02, 2012 6:56 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
mikeshinn wrote:
Thanks for the question, yes indeed thats exactly what its built to do. Just follow the documentation here to set it up:

https://www.atomicorp.com/wiki/index.php/ASL_WAF#local


Thanks, followed the instructions and enabled T-WAF for SSL on port 10000. The certificate used by webmin is of .pem type, and both public and private key use the same file (thats webmin's default config). As soon as it was enabled I could no longer access webmin. Disabled T-WAF, no go. Whitelisted my IP address, no-go. Webmin error log shows "Failed to initialize SSL connection" (webmin is mandatorily accessed via SSL).

/etc/webmin/stop, followed by a /etc/webmin/start, and still no-go.

i waited 20 minutes and it worked again, but then I started T-WAF and it stopped again.

I came back 1 hour later and I could access Webmin again: it seems that turning on T-WAF disables access to Webmin for about 1 hours after it is enabled. Restarting webmin doesnt help. This is a problem.

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Tue Jul 03, 2012 9:59 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
pem certificates are not supported at this time


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Tue Jul 03, 2012 11:14 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
scott wrote:
pem certificates are not supported at this time


would it work if I convert it to another format? which format would that be ?

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Tue Jul 03, 2012 2:14 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Thanks for the question, any format that's compatible with Apache 2.2 will work.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Using WAF to protect Virtualmin @ port 10000
Unread postPosted: Tue Jul 03, 2012 3:39 pm 
Offline
Forum Regular
Forum Regular

Joined: Tue Jun 09, 2009 12:57 pm
Posts: 134
mikeshinn wrote:
Thanks for the question, any format that's compatible with Apache 2.2 will work.


PEM is compatible with Apache. In fact, the default certificate format for SSLeay/OpenSSL is PEM.

I think you meant to say that Apache expects the certificate and private key to be in separate files. Since PEM is the same Base64 encoded ASCII file as .crt and .key, I broke up a copy of the .PEM file into .crt and .key. I then pointed T-WAF to use those files and disabled/enabled T-WAF (just to make sure it reloaded the conf). I also restarted webmin.

And I still have the same problem: Webmin wont be accessible for the next X hours.

Note that even while I was using the prior PEM setup WAF was working. It just breaks webmin for X hours.

_________________
CentOS 6.3 (2.6.32.60-40.art.x86_64)
ASL 3.2.13-30.el6.art
Webmin 1.6.2
Virtualmin 3.99.gpl
Apache 2.2.15
PHP 5.3.3 (mod_fcgid/2.3.7)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group