
1 lusin 2013-02-15 17:42:56 +08:00 先将22端口开通再drop |
2 va3rrw 2013-02-15 19:33:08 +08:00 Arno's iptables firewall: http://rocky.eld.leidenuniv.nl/joomla/index.php?option=com_content&view=article&id=45&Itemid=63 我自己用了好几年了. |
3 aveline 2013-02-15 20:12:10 +08:00 iptables-save > firewall 然后修改 firewall 这个文件 修改完之后 iptables-restore < firewall 即可 |
5 imstand 2013-02-16 10:28:57 +08:00 首先修改配置文件 vi /etc/ssh/sshd_config 找到#Port 22一段,这里是标识默认使用22端口,修改为如下: Port 22 Port 50000 然后保存退出 执行/etc/init.d/sshd restart 这样SSH端口将同时工作与22和50000上。 1. [root@srv6 ~]# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 2. [root@srv6 ~]# iptables -t nat -A PREROUTING -p udp -m udp --dport 80 -j REDIRECT --to-ports 8080 |
6 sillyousu 2013-02-16 13:24:53 +08:00 http://wiki.debian.org/iptables 这个配置规则就差不多了。按照需要改端口,再添加一些自己需要的。 把上面iptables的规则保存在一个文件里面,例如保存在 /etc/iptables/iptables.rules 然后用下面的命令 $ sudo iptables-restore < /etc/iptables/iptables.rules |