2021-12-07 14:09
115
0
0
0
iptables学习手记
iptables外面的文章太多了,我这里就把我自己的过程记录一下。
iptables的应用场合太多。我这里的使用是。
国外vps,安装iptables,
1:需要允许ssh远程访问,
2:开放常用的端口,web,mail等端口。打开1194 vpn端口。
3:希望openvpn,启用NAT的功能。
安装iptables
2021-12-07 14:09
106
0
0
0
Fail2ban即可以用系统自带的防火墙,如Linux的iptables或FreeBSD的ipfw,又可以换用tcpd,此外还可以扩展到其它网络服务,目前我主要使用在监控22端口,以及/var/log/secure日志,主要是那些非法访问的日志,当发现某个IP在一个定义的时间段内,尝试SSH密码失败达到一个定义的次数,则利用LINUX的iptables阻止改
2021-12-07 14:09
136
0
0
0
iptables常用端口设置
#开启22端口
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
#关闭所有端口
iptables -P INPUT DROP
iptables -P FORWARD DRO
2021-12-07 14:11
120
0
0
0
安装xunsearch 出现failed to configure scws和configure: error: zlib.h not found今天本地测试tipask,然后需要安装xunsearch,在安装时出现了错误[vagrant@askbuy~]$cd/usr/local
[vagrant@askbuylocal]$ls
binetcgamesin
2021-12-07 14:11
226
0
0
0
tar 打包命令-x:创建-v:显示运行过程-f:指定文件名-z:调用gzip-t:查看压缩文件的内容-x:解开tar文件tar -cvf test.tar将当前文件夹内文件压缩成test.tartar -cvf abc.tartar -xvf ../abc.tar 解压tar -zcvf efg.tar.gz *tar -zxvf efg.tar.gzgz
2021-12-07 14:12
125
0
0
0
管理文件权限chmod命令格式1chmod [-R] {[ugoa][+-=][rwxst]}格式2:chmod [-R] {ugoa][+-=][ugo]}-R若为目录,则递归属性chmod go-r testfile1chmod u+x tstfie1chmod u-x,go +r testfile1chmod g=u testfile1chmod o
2021-12-07 14:12
116
0
0
0
文本编辑器VI的使用vi是标准的linux文本编辑程序vi filename如果存在文件就打开否则新建vi booke状态行输入模式(输入文本)命令模式(执行命令)末行模式(执行特定命令)iaoIAO进入编辑模式命令模式在命令模式下,可以输入命令执行许多种功能:w(保存):wq(保存退出):x(保存退出):q!(不保存退出)光标移动(上下左右)编辑模式开头处
2021-12-07 14:12
127
0
0
0
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2DESCRIPTION :scp cop