среда, 29 июня 2016 г.

Linux more then 3 DNS

Copy /etc/resolv.conf with some other name

# cp /etc/resolv.conf /etc/resolv1.conf

Edit dnsmasq configuration. Define new file:
# vi /etc/dnsmasq.conf

> resolv-file=/etc/resolv1.conf

Change in NetworkManager (or some other) or resolv.conf directry, if not use some manager, to your local nameserver 127.0.0.1

Start dnsmasq
systemctl start dnsmasq
Check result starting
systemctl status dnsmasq
Enable autoload

systemctl enable dnsmasq


You can redirect some domains to other adress by dnsmasq
> address=/loc/127.0.0.1

All domains *.loc will be redirected to local machine.

Linux proxy wrapper CLI

Simple to use proxychains
# zypper -n in proxychains

modify for like you want (by examples)
# vi /etc/proxychains.conf

$ proxychains some_program

понедельник, 27 июня 2016 г.

OpenSuse Leap import cer

Coming to folder with certificates and convert to PEM:
$ cd /some/path
$ for f in *.cer; do openssl x509 -in "$f" -inform DER -out "$f.pem" -outform PEM; done;





Now as root, move PEM files and generate symlink hashes:
# cd /var/lib/ca-certificates/openssl
# cp /some/path/*.pem .
# for file in *.pem; do ln -s "$file" "$(openssl x509 -hash -noout -in "$file").0"; done


Logout as root and verify:
$ openssl verify -crl_check_all *.pem