ubuntu ipsec配置_ubuntu安装iperf3

大家好,又见面了,我是你们的朋友全栈君。

ipset package in Ubuntu

ipset: administration tool for kernel IP sets ipset-dbgsym: debug symbols for ipset libipset-dev: development files for IP sets libipset13: library for IP sets libipset13-dbgsym: debug symbols for libipset13

This package has 0 new bugs and 0 open questions.

apt-get -y install ipset libipset-dev

但是该方式安装的ipset版本是6.xxx的版本,要装7.xxx的版本貌似还的手动编译方式如下:

wget http://ipset.netfilter.org/ipset-7.5.tar.bz2
tar xvf ipset-7.5.tar.bz2
cd ipset-7.5
apt-get -y install autoconf automake libtool libmnl-dev
apt-get -y install linux-kernel-headers kernel-package
./configure && make && make install

测试:

2、创建一个新的ipset ipset create openapi hash:net 2.1、查看已创建的ipset 2.2、ipset认可以存储65536个element,使用maxelem指定数量 ipset create openapi hash:net maxelem 1000000 ipset list 3、加入一个黑名单ip ipset add openapi 180.156.238.246 4、创建防火墙规则,与此同时,openapi这个ipset里的ip都无法访问22端口 iptables -I INPUT -m set –match-set openapi src -p tcp –destination-port 22 -j DROP service iptables save 5、去除黑名单,与此同时,又可以访问了 ipset del openapi 180.156.238.246 6、将ipset规则保存到文件 ipset save openapi -f openapi.txt 7、删除ipset ipset destroy openapi 8、导入ipset规则 ipset restore -f openapi.txt

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/184930.html原文链接:https://javaforall.cn

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...