mirror of
				https://github.com/telekom-security/tpotce.git
				synced 2025-10-31 12:32:55 +00:00 
			
		
		
		
	continue tweaking installer
This commit is contained in:
		
							parent
							
								
									7e15e1b2fa
								
							
						
					
					
						commit
						992f2a052a
					
				
					 1 changed files with 17 additions and 27 deletions
				
			
		|  | @ -618,19 +618,14 @@ wait | ||||||
| fuPULLIMAGES 2>&1 | dialog --title "[ Pulling docker images, please be patient ]" $myPROGRESSBOXCONF | fuPULLIMAGES 2>&1 | dialog --title "[ Pulling docker images, please be patient ]" $myPROGRESSBOXCONF | ||||||
| 
 | 
 | ||||||
| # Let's add the daily update check with a weekly clean interval | # Let's add the daily update check with a weekly clean interval | ||||||
| dialog --title "[ Modifying update checks ]" $myPROGRESSBOXCONF <<EOF | myUPDATECHECK="APT::Periodic::Update-Package-Lists \"1\"; | ||||||
| EOF | APT::Periodic::Download-Upgradeable-Packages \"0\"; | ||||||
| tee /etc/apt/apt.conf.d/10periodic 2>&1>/dev/null <<EOF | APT::Periodic::AutocleanInterval \"7\"; | ||||||
| APT::Periodic::Update-Package-Lists "1"; | " | ||||||
| APT::Periodic::Download-Upgradeable-Packages "0"; | echo "$myUPDATECHECK" 2>&1 | tee /etc/apt/apt.conf.d/10periodic | dialog --title "[ Modifying update checks ]" $myPROGRESSBOXCONF | ||||||
| APT::Periodic::AutocleanInterval "7"; |  | ||||||
| EOF |  | ||||||
| 
 | 
 | ||||||
| # Let's make sure to reboot the system after a kernel panic | # Let's make sure to reboot the system after a kernel panic | ||||||
| dialog --title "[ Reboot after kernel panic ]" $myPROGRESSBOXCONF <<EOF | mySYSCTLCONF=" | ||||||
| EOF |  | ||||||
| tee -a /etc/sysctl.conf 2>&1>/dev/null <<EOF |  | ||||||
| 
 |  | ||||||
| # Reboot after kernel panic, check via /proc/sys/kernel/panic[_on_oops] | # Reboot after kernel panic, check via /proc/sys/kernel/panic[_on_oops] | ||||||
| # Set required map count for ELK | # Set required map count for ELK | ||||||
| kernel.panic = 1 | kernel.panic = 1 | ||||||
|  | @ -639,13 +634,11 @@ vm.max_map_count = 262144 | ||||||
| net.ipv6.conf.all.disable_ipv6 = 1 | net.ipv6.conf.all.disable_ipv6 = 1 | ||||||
| net.ipv6.conf.default.disable_ipv6 = 1 | net.ipv6.conf.default.disable_ipv6 = 1 | ||||||
| net.ipv6.conf.lo.disable_ipv6 = 1 | net.ipv6.conf.lo.disable_ipv6 = 1 | ||||||
| EOF | " | ||||||
|  | echo "$mySYSCTLCONF" 2>&1 | tee -a /etc/sysctl.conf | dialog --title "[ Tweak Sysctl ]" $myPROGRESSBOXCONF | ||||||
| 
 | 
 | ||||||
| # Let's setup fail2ban config | # Let's setup fail2ban config | ||||||
| dialog --title "[ Setup fail2ban config ]" $myPROGRESSBOXCONF <<EOF | myFAIL2BANCONF="[DEFAULT] | ||||||
| EOF |  | ||||||
| tee /etc/fail2ban/jail.d/tpot.conf 2>&1>/dev/null <<EOF |  | ||||||
| [DEFAULT] |  | ||||||
| ignore-ip = 127.0.0.1/8 | ignore-ip = 127.0.0.1/8 | ||||||
| bantime = 3600 | bantime = 3600 | ||||||
| findtime = 600 | findtime = 600 | ||||||
|  | @ -668,22 +661,18 @@ enabled = true | ||||||
| port    = 64295 | port    = 64295 | ||||||
| filter  = sshd | filter  = sshd | ||||||
| logpath = /var/log/auth.log | logpath = /var/log/auth.log | ||||||
| EOF | " | ||||||
|  | echo "$myFAIL2BANCONF" 2>&1 | tee /etc/fail2ban/jail.d/tpot.conf | dialog --title "[ Setup fail2ban config ]" $myPROGRESSBOXCONF | ||||||
| 
 | 
 | ||||||
| # Fix systemd error https://github.com/systemd/systemd/issues/3374 | # Fix systemd error https://github.com/systemd/systemd/issues/3374 | ||||||
| dialog --title "[ systemd fix ]" $myPROGRESSBOXCONF <<EOF | mySYSTEMDFIX="[Link] | ||||||
| EOF |  | ||||||
| tee /etc/systemd/network/99-default.link 2>&1>/dev/null <<EOF |  | ||||||
| [Link] |  | ||||||
| NamePolicy=kernel database onboard slot path | NamePolicy=kernel database onboard slot path | ||||||
| MACAddressPolicy=none | MACAddressPolicy=none | ||||||
| EOF | " | ||||||
|  | echo "$mySYSTEMDFIX" 2>&1 | tee /etc/systemd/network/99-default.link | dialog --title "[ systemd fix ]" $myPROGRESSBOXCONF | ||||||
| 
 | 
 | ||||||
| # Let's add some cronjobs | # Let's add some cronjobs | ||||||
| dialog --title "[ Adding cronjobs ]" $myPROGRESSBOXCONF <<EOF | myCRONJOBS=" | ||||||
| EOF |  | ||||||
| tee -a /etc/crontab 2>&1>/dev/null <<EOF |  | ||||||
| 
 |  | ||||||
| # Check if updated images are available and download them | # Check if updated images are available and download them | ||||||
| 27 1 * * *      root    docker-compose -f /opt/tpot/etc/tpot.yml pull | 27 1 * * *      root    docker-compose -f /opt/tpot/etc/tpot.yml pull | ||||||
| 
 | 
 | ||||||
|  | @ -698,7 +687,8 @@ tee -a /etc/crontab 2>&1>/dev/null <<EOF | ||||||
| 
 | 
 | ||||||
| # Check for updated packages every sunday, upgrade and reboot | # Check for updated packages every sunday, upgrade and reboot | ||||||
| 27 16 * * 0     root    apt-get autoclean -y && apt-get autoremove -y && apt-get update -y && apt-get upgrade -y && sleep 10 && reboot | 27 16 * * 0     root    apt-get autoclean -y && apt-get autoremove -y && apt-get update -y && apt-get upgrade -y && sleep 10 && reboot | ||||||
| EOF | " | ||||||
|  | echo "$myCRONJOBS" 2>&1 | tee -a /etc/crontab | dialog --title "[ Adding cronjobs ]" $myPROGRESSBOXCONF | ||||||
| 
 | 
 | ||||||
| # Let's create some files and folders | # Let's create some files and folders | ||||||
| mkdir -p /data/ciscoasa/log \ | mkdir -p /data/ciscoasa/log \ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 t3chn0m4g3
						t3chn0m4g3