Hi, I'm Canan
Oups ...
Never forget impossible is possible
:(
Your PC ran into a problem and needs to restart.
We're just collecting some error info, and then we'll restart for you.
0% complete
For more information about this issue and possible fixes, visit
https://www.windows.com/stopcode
If you call a support person, give them this info:
Stop code: SYSTEM_SERVICE_EXCEPTION
First installation
Ubuntu
Steps
- Ensure your system is up to date
apt-get update && apt-get upgrade -y- Installation useful packets
sudo apt-get -y install dos2unixsudo apt-get -y install zip unzipsudo apt install nanosudo apt install bash-completionsudo apt-get -y install mlocate & sudo updatedb- > In Nano: Use CTRL+K to delete the full line / CTRL-X to exit
- Secure your server
apt-get -y install fail2banUpdate "/etc/fail2ban/jail.conf" file (if you have [ssh] inside)- > Add or Edit (not remove !) to have following lines:
[DEFAULT]ignoreip = 127.0.0.1/8 __YOUR_IP__bantime = 600maxretry = 5- > Force reload it with:
sudo systemctl restart fail2ban- > Check which IP try and fail with:
awk '($(NF-1) = /Ban/){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -n- > Secure shared memory
sudo nano /etc/fstab- > Add or Edit (not remove !) to have following lines:
tmpfs /dev/shm tmpfs defaults,noexec,nosuid 0 0- > Harden network with sysctl settings
sudo nano /etc/sysctl.conf- > Add or Edit (not remove !) to have following lines:
# IP Spoofing protectionnet.ipv4.conf.all.rp_filter = 1net.ipv4.conf.default.rp_filter = 1# Ignore ICMP broadcast requestsnet.ipv4.icmp_echo_ignore_broadcasts = 1# Disable source packet routingnet.ipv4.conf.all.accept_source_route = 0net.ipv6.conf.all.accept_source_route = 0net.ipv4.conf.default.accept_source_route = 0net.ipv6.conf.default.accept_source_route = 0# Ignore send redirectsnet.ipv4.conf.all.send_redirects = 0net.ipv4.conf.default.send_redirects = 0# Block SYN attacksnet.ipv4.tcp_syncookies = 1net.ipv4.tcp_max_syn_backlog = 2048net.ipv4.tcp_synack_retries = 2net.ipv4.tcp_syn_retries = 5# Log Martiansnet.ipv4.conf.all.log_martians = 1net.ipv4.icmp_ignore_bogus_error_responses = 1# Ignore ICMP redirectsnet.ipv4.conf.all.accept_redirects = 0net.ipv6.conf.all.accept_redirects = 0net.ipv4.conf.default.accept_redirects = 0net.ipv6.conf.default.accept_redirects = 0# Ignore Directed pingsnet.ipv4.icmp_echo_ignore_all = 1- > Force reload it with:
sudo sysctl -p- > Prevent IP Spoofing
sudo nano /etc/host.conf- > Add or Edit (not remove !) to have following lines:
order bind,hostsmulti onnospoof on- > Harden PHP for security (if you have PHP installed)
sudo nano /etc/php5/apache2/php.ini- > Add or Edit (not remove !) to have following lines:
disable_functions = exec,system,shell_exec,passthruregister_globals = Offexpose_php = Offmagic_quotes_gpc = On- Custom startup message
sudo apt -y install screenfetchsudo apt -y install toiletsudo apt -y install figletUpload "clean.sh" and "now.sh" (in /home/Files/) and do "chmod +x clean.sh now.sh" to give it execution right to be able to use itUpload ".profile" (in /home/Files/) to be able to use itUpdate "/home/now.sh" file- > Add or Edit (not remove !) to have following lines:
curl wttr.in/__YOUR_CITY__?0 --silent --max-time 3Update "~/.bashrc" file- > Add or Edit (not remove !) to have following lines:
source /home/Files/.profile- > Force reload it with:
source ~/.bashrc- Apache2
apt-get install -y apache2 apache2-utilsUpdate "/etc/apache2/conf-available/security.conf" file- > Add or Edit (not remove !) to have following lines:
ServerTokens ProdServerSignature Off- > Activate module
sudo rewrite- > Force reload it with:
service apache2 restart- > You can edit /etc/apache2/apache2.conf to add your custom directory rules, like:
<Directory /home/canan>- Options -Indexes
- AllowOverride All
- Require all granted
</Directory>Do not forget to empty (or put your site) in /var/www/html/ folder- PHP (if needed)
sudo apt-get install -y php libapache2-mod-php php-gdIf you want to test it, simply create a test file, then go on it, finally delete itUpdate "/var/www/html/test.php" file (change by yours)- > Add to have following lines:
<?php- phpinfo();
?>- > Force reload it with:
service apache2 restart- Go to http://__YOUR_IP__/test.php
- Crontab
crontab -e- > Add or Edit (not remove !) to have following lines :
10 5 * * MON apt-get -y autoclean; apt-get -y autoremove; apt-get -y clean;20 5 * * MON dpkg --purge $(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2);30 5 * * MON rm -fr /var/log/syslog.*; rm -fr /var/log/auth.log.*;40 5 * * MON apt-get -y update; apt-get -y upgrade