This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| No /usr on this server | |
| root@rescue:/mnt/md2# ls -la | |
| total 88 | |
| dr-xr-xr-x 18 root root 4096 Mar 6 02:58 . | |
| drwxr-xr-x 5 root root 100 Mar 9 03:35 .. | |
| -rw-r--r-- 1 root root 0 Jun 10 2016 .autorelabel | |
| lrwxrwxrwx 1 root root 7 Dec 14 2015 bin -> usr/bin | |
| dr-xr-xr-x 5 root root 4096 Jun 29 2016 boot | |
| drwxr-xr-x 2 root root 4096 Jul 7 2014 dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When you go to page | |
| https://bitearn.org/ | |
| Many content is loaded with http:// | |
| This need to be changed to use https:// | |
| Contents that are loaded with http are |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@host1:~/server-setup/benchmark# ./benchmark.sh --speedtest | |
| Speedtest (IPv4 only) | |
| --------------------- | |
| Your public IPv4 is 144.217.65.41 | |
| Location Provider Speed | |
| CDN Cachefly 98.5MB/s | |
| Atlanta, GA, US Coloat 29.6MB/s | |
| Dallas, TX, US Softlayer 44.1MB/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| boby@hon-pc-01:~/Downloads $ sudo openvpn --config client.ovpn | |
| Fri Mar 3 01:54:34 2017 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Feb 2 2016 | |
| Fri Mar 3 01:54:34 2017 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08 | |
| Enter Auth Username: ******* | |
| Enter Auth Password: *********** | |
| Fri Mar 3 01:54:44 2017 Control Channel Authentication: tls-auth using INLINE static key file | |
| Fri Mar 3 01:54:44 2017 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication | |
| Fri Mar 3 01:54:44 2017 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication | |
| Fri Mar 3 01:54:44 2017 Socket Buffers: R=[212992->200000] S=[212992->200000] | |
| Fri Mar 3 01:54:44 2017 UDPv4 link local: [undef] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /etc/openvpn/easy-rsa/ | |
| source ./vars | |
| ./build-key CLIENT-NAME-HERE | |
| Press all enter, last 2 needed to press y | |
| Now download following files to your computer | |
| /etc/openvpn/easy-rsa/keys/ca.crt | |
| /etc/openvpn/easy-rsa/keys/CLIENT-NAME-HERE.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while true; do | |
| if ip a | grep -Eq ': tun0:.*state UP' | |
| then | |
| sleep 5 | |
| else | |
| echo "OpenVPN down, Reconnecting." | |
| openvpn --config /path/to/client.ovpn | |
| sleep 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@backup:~# cat 1.sh | |
| #!/bin/bash | |
| TO_EMAIL="admin@hostonnet.com" | |
| SUBJECT="checkin" | |
| IP=`curl -s http://checkip.amazonaws.com` | |
| echo "To: $TO_EMAIL" > /tmp/checkin-alert.txt | |
| echo "Subject: $SUBJECT" >> /tmp/checkin-alert.txt | |
| echo "" >> /tmp/checkin-alert.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| IP=`curl -s http://checkip.amazonaws.com` | |
| echo $IP | mail -s "checkin" you@yourdomain.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First you need to create password, this can be done by runing grub-mkpasswd-pbkdf2 | |
| root@hon-vpn:~# grub-mkpasswd-pbkdf2 | |
| Enter password: | |
| Reenter password: | |
| PBKDF2 hash of your password is grub.pbkdf2.sha512.10000.E421A6997EBAF6E49B05AC950CC8154A4B9D703C8498E2916DCC31B0FC9F11B6B53E16B34DD09A1F90250E4E36AB930C6BED3C9D3B01D010A7B377F5CEF4B2AA.C5B99B66841C5325A1175AF05D50344260B6FC84912E2B1C591A085C0C0ECCE74B1661703F344E372ADEE67D409A3B538047EC437983D723991C5168979F8789 | |
| root@hon-vpn:~# | |
| Now edit file /etc/grub.d/00_header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $badUrls = array( | |
| '162.252.83.164', | |
| 'ns1.kingashoes.com', | |
| 'ns2.kingashoes.com', | |
| 'mail.kingashoes.com', | |
| 'ftp.kingashoes.com', | |
| 'www.images.kingashoes.com' | |
| ); |