wombat.ch

your Partner for Network Design and CMS

Software Information

UPS infos via Rasperry Pi im Netz propagieren und Server oder NAS zum Download animieren.

Hardware
- Raspberry Pi, Model B+ PLUS - 512MB RAM
- APC Power Saving Back-UPS Pro 900


Software one the Raspberry Pi
- Debian
- Munin Node - APC UPS Pro 900
-

Configs to do on

  Raspberry Pi Server FreeNAS 10
Raspberry Pi RASPBIAN LITE Minimal image based on Debian (follow the Pi Instruciton to install)  ?  ?
 

on the Card add a empty file called SSH on the root
(Windows: cmd go to the drive like i: type NUL > SSH)
On boot Pi will get a IP and with SSH you may conect
username: pi
password: raspberry

VI

# sudo -i
# apt install vim-nox -y
# echo set number >> ~/.vimrc

Fix IP address # sudo vi /etc/dhcpcd.conf  ?
40 # Example static IP configuration:
41 interface eth0
42 static ip_address=192.168.0.15/24
44 static routers=192.168.0.1
45 static domain_name_servers=8.8.8.8
   
   
Set Time # dpkg-reconfigure tzdata
 
  Script for smart update
 
Apache 2 # apt -y install apache2    
 
Fail2Ban

# apt install fail2ban -y
# vi /etc/fail2ban/jail.local

   [ssh]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
bantime = 900
banaction = iptables-allports
findtime = 900
maxretry = 3
   
   # service fail2ban restart    
  check
# iptables -L -n --line
   
       
NUT # apt install -y nut nut-monitor nut-cgi nut-ipmi nut-snmp nut-xml    
  # lsusb
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
   
  # vi /etc/nut/nut.conf

MODE=netserver
   
  # vi /etc/nut/ups.conf  (around line 121)

[apc900]
driver = usbhid-ups # Treiber der verwendet werden soll
port = auto 
desc = "APC 900 Smart-UPS" # Beschreibung der USV
# maxretry = 3
   
  # systemctl reload nut-server    
  # systemctl status nut-server    
 

# apt install wakeonlan
# apt install etherwake

arp command to find the MAC address
# arp

   
       
   # upsc APC900 | grep battery.runtime: | awk '{print $2/60}' OFMT="%3.1f"     


Quellen/Source:
- Raspberry FORUM: UPS Information to LAN
https://www.tobias-baeumer.de/apc-usv-proxmox/
networkupstools.org
- servernetworktech.com/2013/06/upsalert-my-solution-to-graceful-server-shutdowns-on-power-loss
- NUT
- /www.pontikis.net/blog/apc-ups-master-slave-setup-apcupsd
Munin | Plugin | NUT
- bernaerts.dyndns.org/linux/75-debian/335-debian-wheezy-install-monitor-eaton-ups
thomas-leister.de/powerwalker-ups-debian-stretch/
wiki.debian-fr.xyz/Configurer_et_surveiller_un_onduleur_avec_NUT
- Raspberry Pi - UPS server using NUT 
-
-
-
-

Add a comment
LXC | Monitoring rsyslog and LogAnalyzer
- www.rsyslog.com/  | Wiki rsyslog
loganalyzer.adiscon.com/ |


Install
apt update -y
apt upgrade -y
apt install apache2 apache2-doc -y
apt install php5-common libapache2-mod-php5 php5-cli php5-gd -y
apt install mysql-server mysql-client -y
apt install php5-mysql -y

mysql_secure_installation

apt upgrade -y
-  
apt install rsyslog -y
vi /etc/syslogserver.conf # provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
apt install rsyslog-mysql


 cd /usr/src
wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.6.tar.gz
tar -xzvf loganalyzer-3.6.6.tar.gz
mv /usr/src/loganalyzer-3.6.6/src /var/www/html/loganalyzer
cd /var/www/html/loganalyzer
touch config.php
chmod 777 config.php

 

 Config on a Ciso Switch
enable
config terminal
logging on
logging 10.147.42.37
logging trap 9 (9 for Test then back to 4 or 5)
service sequence-numbers
service timestamps log datetime msec

 

 

 

 

 

Config a Client (on Debian 8)

 /etc/ryslog.conf  $ModLoad imuxsock

$ModLoad imklog

# Provides UDP forwarding. The IP is the server's IP address
  *.* @10.147.42.37:514

# Provides TCP forwarding. But the current server runs on UDP
# *.* @@192.168.1.1:514
Change the IP to your RsyncServer
service rsyslog restart    

 

 

 


Quellen/Source:
- https://www.howtoforge.com/centralized-rsyslog-server-monitoring
- http://www.laub-home.de/wiki/Syslog_Server_unter_Debian_Linux_mit_Rsyslog
-
-
-
-
-
-

Add a comment

LXC | Monitoring Zabbix

 

Debian LXC (Debian GNU/Linux 8 (jessie))

Disk 25GB

RAM 2 GB

 Remove Zabbix Client apt purge --auto-remove zabbix-agent

# wget http://repo.zabbix.com/zabbix/3.0/debian/pool/main/z/zabbix-release/zabbix-release_3.0-1+jessie_all.deb
# dpkg -i zabbix-release_3.0-1+trusty_all.deb
# apt-get update
# apt-get install zabbix-server-mysql zabbix-frontend-php
# cd /usr/share/doc/zabbix-server-mysql
# zcat create.sql.gz | mysql -uroot zabbix
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
# service zabbix-server start
# vi /etc/apache2/conf-enabled/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Zurich
# service apache2 restart

 


zabbix agenten installieren 

MONITOR JOOMLA FRONTEND LOGIN WITH ZABBIX

zabbix agent für Windows

 

 


 Source/Quellen:
https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages
- http://www.zabbix.com/- http://lab4.org/wiki/Zabbix_Webfrontend_installieren

- https://www.phyramid.com/en/blog/monitoring-servers-at-phyramid/

- http://php.net/manual/de/timezones.europe.php

 

Add a comment

VM (Absolute minimum, you may need to scale-up as usage increases)
1 x vCPU
1024 MB RAM
10 GB HDD Storage

       
  apt install -y freeradius    
  vi /etc/freeradius/3.0/clients.conf    
  vi   /etc/freeradius/3.0/users    
       
       
  some changes to the log  (start around line 257) i did change so i know all loged user    
  vi /etc/freeradius/3.0/radiusd.conf    
  352         auth_badpass = yes
353         auth_goodpass = yes
   
       
       
       
       
  #   systemctl status freeradius.service    
  #   systemctl stop freeradius.service    
  #   systemctl start freeradius.service    
  #   systemctl restart freeradius.service    
  #     journalctl -xe    
  #    freeradius -v    
  radiusd: FreeRADIUS Version 3.0.12, for host x86_64-pc-linux-gnu, built on Aug 10 2017 at 07:05:06
FreeRADIUS Version 3.0.12
   
  #  multitail /var/log/freeradius/radius.log    
---

 adding a second client Process: 722 ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout (code=exited, status=1/FAILURE)

Aug 22 07:13:33 radius-01 systemd[1]: freeradius.service: Control process exited, code=exited status=1
Aug 22 07:13:33 radius-01 systemd[1]: Failed to start FreeRADIUS multi-protocol policy server.
Aug 22 07:13:33 radius-01 systemd[1]: freeradius.service: Unit entered failed state.
Aug 22 07:13:33 radius-01 systemd[1]: freeradius.service: Failed with result 'exit-code'.
 Stackoverflow



---









Quellen/Source:
 - freeradius.org
- radiusdesk.com
(2017) Hagen-Bauer
-
-
-
-
-
-
-
-
-

- CT 2016 | WLAN sichern mit Radius
- Admin Magazin 02/2010 | Network Access Control mit IEEE 802.1X und Zertifikaten
- CT 2016 | WLAN und LAN sichern mit IEEE 802.1X und Radius
- Linux Magazin 05/2001 | OpenLDAP-Praxis
- Homepage | FreeRADIUS + 802.1x/WPA + OpenLDAP HOWTO
-
-
www.youtube.com
-
-
-
-



Add a comment

KVM mit PXE / DHCP / TFTP

TFTP (tftpd-hpa)

 

apt install tftpd-hpa

 

 

 

 

ich musste unter

 vi /etc/inetd.conf

 den tftp auskomentieren # weil sonst der Port UDP/69 blockiert war

 

 

 

DHCP

 DHCP Server Konfig

vi  /etc/dhcp/dhcpd.conf
cat /var/lib/dhcp/dhcpd.leases

 

service isc-dhcp-server restart
service isc-dhcp-server start
service isc-dhcp-server stop 

 shows the used IP

grep "^lease" /var/lib/dhcp/dhcpd.leases |sort |uniq |wc -l
or

egrep "lease|hostname|hardware|\}" /var/lib/dhcp/dhcpd.leases
or

dhcp-lease-list /var/lib/dhcp/dhcpd.leases

 

PXE

 

 

Quellen/Source:
- www.debian-administration.org
- gparted.org over PXE
- isc-dhcp-server
-
-
-
-
-

Add a comment

wiki.debian.org/BOINC
boinc.berkeley.edu/wiki/Installing_BOINC_on_Debian#Links

# apt install boinc-client
# apt install boinc-manager

for CLI installation, run
# boinccmd

IRC: #debian-boinc on irc.debian.org
munin: https://github.com/munin-monitoring/contrib/tree/master/plugins/boinc

boincstats.com/en/bam/boincstatsSettings/


 

 

to use a bit of CPU do - KVM mit BOINC


Add a comment

Read more: KVM mit BOINC

RSS Feed


Warning: Invalid argument supplied for foreach() in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 39

Warning: Invalid argument supplied for foreach() in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 39

neusten Links


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client2/web2/web/j/modules/mod_quicklistweblinks/helper.php on line 78
many More Links »

part of ...

Linux Counter

Disqus

 

Learning Network

Seti@home & Boinc

myBonic

statistik

 


Who is Online

We have 269 guests and no members online

We have 291 guests, no bots and no members online