Articles of iptables

如何使用Fail2ban设置MySQL的监控?

通过MySQL上的search引擎search互联网和fail2ban在将你的fail2ban日志放入MySQL中产生了很多结果,但是我想监视失败的MySQL尝试login和禁止这些IP。 我的应用程序要求我保持打开MySQL的端口,但为了增加安全性,我已经更改了默认端口。 为了提高安全性,我想用fail2ban监视MySQL日志。 有没有人有一个快速指南来configurationMySQL的fail2ban? 我已经安装了一些其他服务,并且可以使用其他服务,所以您可以跳过安装部分,然后直接跳到configurationconfiguration文件或其他任何必需的configuration文件。

Docker – 从外部访问的暴露端口 – 忽略iptables规则

我有一个docker容器运行如下: docker run –name some_container_1 -p 8080:80 -d some_image 哪个工作正常。 该容器公开它的端口80到8080,并可从本地主机访问。 由于某些原因,它完全忽略了INPUT iptables规则,也可以从外部访问。 我如何限制对我的Docker容器的访问,只允许IP 123.456.789.0从外部访问? 谢谢。 sudo iptables -L -n -v – 行号 Chain INPUT (policy ACCEPT 0 packets, 0 bytes) num pkts bytes target prot opt in out source destination 1 0 0 ACCEPT all — lo * 0.0.0.0/0 0.0.0.0/0 2 365 23380 ACCEPT […]

iptables支持多less条规则?

最近有人问我,我没有答案。 我知道这是一个开放式的问题,但是你可以在表/链中安装规则的数量是否有限制? 如果是这样,我怎么能find它? 我想这将在不同的机器上有所不同。

iptables NAT不存在

今天我主机系统上的iptables nat停止工作,我不知道发生了什么! (这很糟糕,我知道) 所有命令都以root用户身份执行。 如果我运行$ iptables -t nat -L我得到以下错误信息: $ iptables -t nat -L iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. 没有更多可用的更新。 我也重新启动了几个较旧的内核的服务器,但我总是得到相同的错误信息。 我的服务器在最新版本的官方OpenVZ内核的CentOS上运行。 $ uname -r 2.6.32-042stab088.4 还testing了内核版本:2.6.32-042stab85.20和2.6.32-042stab084.26 grub.conf中的第一个内核: title OpenVZ (2.6.32-042stab088.4) root (hd0,1) kernel /vmlinuz-2.6.32-042stab088.4 […]

通过iptables调节带宽

我需要限制带宽的使用,类似于一些ISP的做法,所以在几秒钟后,它会降低速度。

什么是正确的iptables规则允许apt-get下载程序?

当我input类似sudo apt-get install firefox东西时,一切工作,直到它问我: After this operation, 77 MB of additional disk space will be used. Do you want to continue [Y/n]? Y 然后显示错误消息: Failed to fetch: <URL> 我的iptables规则如下: -P INPUT DROP -P OUTPUT DROP -P FORWARD DROP -A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT -A INPUT -p tcp –dport […]

好的iptables服务器的起始规则?

我正在安装一个新的centos 5.4服务器,我希望有一套干净的规则来启动mu iptables。 开始的规则是什么? 这是一个很好的起点: # Allow outgoing traffic and disallow any passthroughs iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # Allow traffic already established to continue iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT # Allow ssh, ftp and web services iptables -A INPUT -p tcp –dport ssh […]

在Centos 6上为iptables加载模块的正确方法是什么?

我应该在哪里加载iptables模块,例如ip_conntrack和ip_conntrack_ftp。 我发现的地方可能是候选人,但是他们呢? /etc/init.d/iptables中的IPTABLES_MODULESvariables 在/etc/modprobe.conf中 在/etc/modprobe.d/xxxx.conf中

我有一个包含所有iptable设置的文件。 我如何加载到我的服务器?

我的系统pipe理员给了我一个iptables规则的文件。 我input什么命令来加载? 我看着他做了,他做了一行! 就像… iptables> thefile.dat?

Node.js不能从Ubuntu的外部IP访问

我相信这是非常不好的,所以原谅我。 我试图在我的Ubuntu 10.04的端口8080上运行一个node.js服务器。 以下是服务器上iptables -L的结果: Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination 这是nmap -p 8080的结果(编辑ip地址,因为一切都应该是开放的) nmap 173.203.xxx.xxx -p 8080 -A Starting Nmap 5.00 ( http://nmap.org ) at 2011-05-19 22:52 PDT Interesting ports on xxx (173.203.xxx.xxx): […]