Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

Leaderboard

Popular Content

Showing content with the highest reputation on 07/08/2015 in Blog Entries

  1. I'm a big fan of trying anything new, but the cardinal rule for me is this: Don't mess with the data. If you don't what to lose those irreplaceable pics of grandma, keep it on a separate drive. This is my mantra. I love playing with my system, updating, tweaking, and exploring. But this can be dangerous to your data. This is also the reason why I chosen to use zfs as my storage for all my data. I can get to it from just anywhere. If it's unix(-like), I can download the kernel modules and access it. I feel like zfs is the becoming the unix(-like) version of fat32. Let me explain. I just did some consulting on a smartos job, but I had to p2v an existing Windows 2k3 server, with a dying hard drive. Smartos is great an all, but it is really not setup to virtualise an existing machine. So I place the failing drive into my setup, created a zvol the same size as the failing drive, dd the old drive to the new zvol. Created a new KVM instance, and booted the thing up. After some general cleanup and a massive amount of defragging, I had a good image ready for production. Smartos side of things was fine, json took a little getting used to, helps finding a good validating editor, zfs send | zfs receive, brought up the zvol, and away I went with the client configuration, igmadm create and all. Now the setup is in production, and all seems to be well. But the real point of this endeavour is this, ZFS is getting to the point of being truly cross platform. The only thing that can't read ZFS is windows, and that access is a samba share away. As much as I like Smartos, I love Funtoo. If I was going to roll out a data centre with clean installs, then Smartos is a great base. But p2v a small business client, not so sure. That's why I'm thinking about a Smartos like Funtoo usb bootable read-only install, and keeping with the way Funtoo is, basically a recipe for using the existing tools to create it, because that is the right way to do it. Our BDFL gives us the tools to do anything we want with his creation, we as users of Funtoo, get to assemble it as we need to get the job done. This is my idea, bootable usb Funtoo minimal, bare essential tools, read only root, builtin zfs kernel and xen hypervisor. Now just to figure out how to do it........
    1 point
  2. OK, you've got your SSL certificate and you have tengine or nginx setup, but you need it secure. After all, you've heard of all the recent DH attacks, BEAST, CRIME, FREAK, Heartbleed and others, right? Is your system already secure? Test it! Check out The SSL Labs Test Site. I'm getting an A+ rating! The following assumes tengine, but nginx is exactly the same, just s/tengine/nginx/g; Need a certificate? OK - I highly recommend StartSSL. It's FREE! These guys will step you through the process by following the instructions on their site. If you have problems, the tech support via email is instantaneous and incredibly professional. My cert was the free variety, but if I ever upgrade, I will go to them because the support (to a non-paying customer no less) was so good. OK ... Make a file /etc/tengine/ssl.conf (or equiv for nginx): >#- Ports to listen on, all addresses, IPv6 and IPv4listen [::]:443 ssl;listen 443 ssl;#- Support current SSL standards and options onlyssl_session_cache shared:SSL:10m;ssl_session_timeout 10m;ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";ssl_session_tickets off;ssl_stapling on;ssl_stapling_verify on;#- And some security related headersadd_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";add_header X-Frame-Options DENY;add_header X-Content-Type-Options nosniff; Now, go into your sites-available and in the server{} configuration for the site you want to include SSL, add these lines: >include /etc/tengine/ssl.conf;ssl_dhparam /etc/ssl/tengine/dhparam4096;ssl_trusted_certificate /etc/ssl/tengine/startssl_trust_chain.crt;ssl_certificate /etc/ssl/tengine/ssl-unified.crt;ssl_certificate_key /etc/ssl/tengine/ssl.key; Now, there are 4 files here for SSL in addition to the one we just included. Let's look at where they come from. First, you should have a certificate file (ssl.crt in the following), and a key for that file (private_ssl.key). The CRT begins with "-----BEGIN CERTIFICATE-----", but you will need to view this in vi, not less (less will try to decode many of these files). Your private key is password protected (the key is "-----BEGIN RSA PRIVATE KEY-----" followed by a line that says ENCRYPTED). Since you probably don't want to issue a password every time you start your server, let's fix that first. >openssl rsa -in private_ssl.key -out /etc/ssl/tengine/ssl.key Easy enough? And we have one of our lines done. 3 to go! The next is to create a chain of certificates back to the root. For StartSSL, you download their cert: >wget https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem Then make the file you need with your cert and theirs. Here's your next 2 files! >cat ssl.crt sub.class1.server.sha2.ca.pem > /etc/ssl/tengine/ssl-unified.crtcp sub.class1.server.sha2.ca.pem /etc/ssl/tengine/startssl_trust_chain.crt Now, the final command for the final file: >openssl dhparam -out /etc/ssl/tengine/dhparam4096 4096 4096 might be overkill, but 1024 is the minimum and you might as well go all out just in case 1024 gets broken next month! Be sure all these files are secure! >chmod 0600 /etc/ssl/tengine/* Delete originals, clean up, then restart tengine. Next I'll cover gzip compression, detecting mobile client, and joomla configuration. Any particular one anyone wants to see first?
    1 point
×
×
  • Create New...