Powered by Typecho)))
Optimized by EAimTY
1.安装
sudo apt-get install ufw
2.启用
sudo ufw enable
sudo ufw default deny
运行以上两条命令后,开启了防火墙,并在系统启动时自动开启。关闭所有外部对本机的访问,但本机访问外部正常。
3.开启/禁用
sudo ufw allow|deny [service]
打开或关闭某个端口,例如:
sudo ufw allow smtp 允许所有的外部IP访问本机的25/tcp (smtp)端口
sudo ufw allow 22/tcp 允许所有的外部IP访问本机的22/tcp (ssh)端口
sudo ufw allow 53 允许外部访问53端口(tcp/udp)
sudo ufw allow from 192.168.1.100 允许此IP访问所有的本机端口
sudo ufw allow proto udp 192.168.0.1 port 53 to 192.168.0.2 port 53
sudo ufw deny smtp 禁止外部访问smtp服务
sudo ufw delete allow smtp 删除上面建立的某条规则
4.查看防火墙状态
sudo ufw status
一. SMIv1
Full Standards:
RFC 1155 -- Structure of Management Information
RFC 1212 -- Concise MIB Definitions
Informational:
RFC 1215 -- A Convention for Defining Traps
二. SMIv2
Full Standards:
RFC 2578 -- Structure of Management Information
RFC 2579 -- Textual Conventions
RFC 2580 -- Conformance Statements
三. SNMPv1
Full Standards:
RFC 1157 -- Simple Network Management Protocol
Proposed Standards:
RFC 1418 -- SNMP over OSI
RFC 1419 -- SNMP over AppleTalk
RFC 1420 -- SNMP over IPX
环境:
随着linux服务器可用性、稳定性逐步增强,企业对线上服务也要求越来越严格,需要有专门的监控系统监控服务的正常运转,并有问题及时发邮件、报警给linux SA。
可能用这个的不是很多,跟nagios无缝兼容。
参数对比可以参考如下:
https://www.icinga.org/nagios/feature-comparison/
一、系统环境:
服务器系统版本:Ubuntu10.04.2 x64 LTS
nginx版本:nginx-0.8.55
Icinga版本:icinga-1.5.0
1.1:系统需求:
Apache/Nginx
GCC compiler
C/C++ development libraries
GD development libraries
libdbi/libdbi-drivers, database like MySQL or PostgreSQL
1.2:基础环境安装:
Apache,PHP,Perl,Mysql,我这里使用Nginx来代替Apache,Mysql已经编译安装,详细过程在此略过。
apt-get install build-essential libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12 libpng12-dev libdbi0 libdbi0-dev libdbd-mysql
二:Icinga安装
2.1:用户添加
useradd -c "Icinga Monitor" -s /bin/false -r icinga
passwd icinga