Seite 2 von 3

Ubuntu redo apt

To clone your system to another system. Or make a backup. In terminal type:

dpkg --get-selections | grep -v deinstall > ubuntu-files

This command makes a file list of all installed packages in your system (and stores it in present working directory). Backup this file in hdd, email, etc…(this file is very small).

In the freshly installed ubuntu system run:

sudo dpkg --set-selections <./ubuntu-files (will set it up and)

apt-get -y update
apt-get dselect-upgrade

This will install only those packages you had installed (with apt-get) in the old system.

                                    (OR)

You could back up all the .deb packages from /var/cache/apt/archives/ and install them manually using:

dpkg -i *.deb

And after that running an update cycle later.

ssl lets encrypt mit plex

von https://forums.plex.tv/t/add-custom-ssl-certs-now-available-for-everyone-how-to/128684/2

I’m not familiar with pkcs#12.

PKCS#12 is an archive file format, in this case used to bundle your private key and certificates.

I however have been using Letsencrypt to get my free signed ssl certs for all my standalone and apache web servers. How can I use does certs in Plex?
Edit: Available cert files from Letsencrypt: cert.pem chain.pem fullchain.pem privkey.pem

You’ll have to create a .pfx file (the PKCS#12 archive) containing both the private key and certificates of your chain. This is done using OpenSSL commands in your terminal:

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out archive.pfx -name "Name for Archive"

You’ll be prompted for a password, this password has to be filled in the Plex’ ‘Custom certificate encryption key’ field. I’m not sure if you had to password protect your private key upon Let’s Encrypt setup, you might be prompted for that as well.

After you’be obtained the .pfx file, store it on your media server computer (e.g. C:\SSL\archive.pfx). Then, occupy the ‘Custom certificate path’ field with the path to the file (C:\SSL\archive.pfx).

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 13).

A quick tip: in the ‘Remote Access’ setting, manually specify port 443 and update your router to point 443 external to 32400 internal. Then, for ‘Custom server access URLs’, fill in: https://plex.example.com:443 8.

You can now visit your custom SSL secured Plex domain using https://plex.example.com. Plex will do the rest. Try testing the domain outside your network the Plex server is hosted in, it might not work accessing the domain internally.

henkieraniDec ’15

I forgot to mention here:

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 7).
That was ment for the ‘Custom certificate domain’ field.

mein DNS mit Bind9 auf Ubuntu

Configs

server.amhang9.de -MASTER-
/etc/bind/named.conf.options

acl goodclients {
        localhost;
        localnets;
};

options {
	directory "/var/cache/bind";

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	// forwarders {
	// 0.0.0.0;
	// };

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
//	dnssec-validation auto;

	auth-nxdomain no;    # conform to RFC1035
//	listen-on-v6 { any; };
	listen-on { 37.120.163.133; 
		127.0.0.1;				
};
	request-ixfr no;	
//	allow-query { goodclients; };
};


zone "tzsz.de" {
	type master;
        file "/var/lib/bind/db.tzsz.de";
	allow-transfer { 5.45.98.66; };
	also-notify { 5.45.98.66; };
};

zone "muc.mes" IN {
	type forward;
	forwarders {
	192.168.15.1;
    };
};

zone "ah9.mes" IN {
        type forward;
        forwarders {
        192.168.234.1;
    };
};

serv.amhang9.de -SLAVE-
/etc/bind/named.conf.options

acl goodclients {
        localhost;
        localnets;
};

options {
	directory "/var/cache/bind";

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	// forwarders {
	// 0.0.0.0;
	// };

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
//        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
        listen-on { 5.45.98.66; 
		127.0.0.1;
};
	request-ixfr no;
//	allow-query { goodclients; };
};

zone "tzsz.de" {
        type slave;
        file "/var/cache/bind/db.tzsz.de";
	masters { 37.120.163.133; };
};


zone "muc.mes" IN {
        type forward;
        forwarders {
        192.168.15.1;
    };
};

zone "elip.mes" IN {
        type forward;
        forwarders {
        192.168.112.1;
    };
};

server.amhang9.de /var/lib/bind/db.tzsz.de

;
; BIND data file for local loopback interface
;
$TTL	3600
@	2560	IN	SOA	tzsz.de. root.tzsz.de. (
				     53		; Serial
				3600		; Refresh
				  3600		; Retry
				3600		; Expire
				 3600 )	; Negative Cache TTL
	3600	IN	A	37.120.163.133
@	3600	IN	MX	100 mxlb.ispgateway.de.
;
@	86400	IN	NS	server.amhang9.de.
@	86400	IN	NS	serv.amhang9.de.
@	3600	IN	A	37.120.163.133
@	3600	IN	AAAA	2a03:4000:6:3114::1
*	3600	IN	A	37.120.163.133
*	3600    IN      AAAA    2a03:4000:6:3114::1
foehn	3600	IN	AAAA	2001:4c50:14d:cb00:208:9bff:fed2:4777
ow	3600	IN	AAAA	2001:4c50:100:4:9c0a:bbbb:fbec:4416

Befehle

dig ANY amhang9.de @ns.namespace4you.de
dig ANY tzsz.de @server.amhang9.de

Dokus

http://www.zytrax.com/books/dns/
https://help.ubuntu.com/community/BIND9ServerHowto

Schroeder3

Software

KramKram

du -hs * | sort -h     #Datei/Ordnergröße sortiert klein>groß
rsync --list-only username@servername:/directoryname/ #rsync Ziel checken
su nobody -c 'echo "hello from $USER"'  #als anderer User ausführen
netstat -plnt # offene Ports
samba-tool user list # zeige Samba User
getent passwd ELIP\\herbs # zeigt Samba UIDs
wbinfo -g #zeigt Samba Gruppen
wbinfo -u #zeigt Samba User
samba-tool user add messi #useradd
samba-tool domain passwordsettings set --complexity=off #einfache passwörter
net rpc rights grant 'ELIP\Domain Admins' SeDiskOperatorPrivilege -U'ELIP\administrator'

Weiterlesen

Versetzter zyklischer Crontab

Use this:

*/5+2 * * * * 1st-script
*/5+4 * * * * 2nd-script
For future reference take a look at this online Cron Job Generator.

Update

Since there are several reports that the + syntax is not working on Ubuntu 14.04, here’s a variation:

2-59/5 * * * * 1st-script
4-59/5 * * * * 1st-script
This will result in the 1st script to run every 5 minutes starting with an offset of 2 minutes at the beginning of each hour and the 2nd script to behave the same with an offset of 4 minutes.