172.18.120.5 机器有外网IP 在172.18.120.5上运行下面的命令: sudo iptables -t nat -A PREROUTING -p tcp --dport 8017 -j DNAT --to-destination 172.18.120.5:8017sudo ipta ...
分类:
其他好文 时间:
2017-11-05 21:15:55
阅读次数:
214
Sudo iptables -A INPUT ACCEPT -A append -I insert sudo iptables -p INPUT DROP sudo iptables -A INPUT -P tcp —dport 23 -j ACCEPT Sudo iptables -f (删除规则 ...
分类:
其他好文 时间:
2017-10-21 12:17:59
阅读次数:
218
查看所有端口 netstat -ntlp 1、开启端口(以80端口为例) 方法一: /sbin/iptables -I INPUT -p tcp --dport 端口号 -j ACCEPT 写入修改 /etc/init.d/iptables save 保存修改 service iptables re ...
分类:
其他好文 时间:
2017-10-16 13:34:11
阅读次数:
371
一、查看哪些端口被打开netstat-anp二、关闭端口号:iptables-AINPUT-ptcp--drop端口号-jDROPiptables-AOUTPUT-ptcp--dport端口号-jDROP三、打开端口号:iptables-AINPUT-ptcp--dport端口号-jACCEPT四、以下是linux打开端口命令的使用方法。nc-lp23&(打开23端口,即telnet)n..
分类:
系统相关 时间:
2017-10-13 22:23:58
阅读次数:
230
当访问域名的时候,端口默认指定的是80; 而80端口在Linux系统下,1024之前的端口是只有root用户才能使用的, 因此将,系统层面将端口80 映射到8080, iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-p ...
分类:
其他好文 时间:
2017-10-11 16:53:38
阅读次数:
153
iptables 指令 语法: iptables [-t table] command [match] [-j target/jump] -t 参数用来指定规则表,内建的规则表有三个,分别是:nat、mangle 和 filter, 当未指定规则表时,则一律视为是 filter。 各个规则表的功能如 ...
分类:
其他好文 时间:
2017-09-27 13:06:54
阅读次数:
182
关于Linux Centos6.5的SSH默认端口修改的博客有一大堆,我在这里就不啰嗦了,但是面对Centos 6.9,就会发现有一个巨坑; 修改iptables之后执行下面的命令后; 会发现dport 修改失败,端口号仍为22, 此时,你会很郁闷的发现无论怎么修改都不生效, 重点来了,我尝试了无数 ...
分类:
系统相关 时间:
2017-09-16 13:34:04
阅读次数:
210
iptables -vnL --line-numbers iptables -A INPUT -p tcp --dport 80 -j ACCEPT # 在表的对应链上添加规则 iptables [-t table] {-A|-C|-D} chain rule-specification # ipv ...
分类:
其他好文 时间:
2017-09-14 21:54:22
阅读次数:
223
开放某个范围段内的端口: -A INPUT -p tcp -m state --state NEW -m tcp --dport 9001:9009 -j ACCEPT 开放多个不连续的端口: -A INPUT -p tcp -m state --state NEW -m multiport --d ...
分类:
其他好文 时间:
2017-09-09 11:54:24
阅读次数:
179
-A INPUT -p tcp --dport 80 -m string --string *.(自已的域名).com --algo bm -j ACCEPT -A INPUT -p tcp --dport 80 -m string --string *.renweiba.com --algo bm... ...
分类:
其他好文 时间:
2017-09-05 00:16:17
阅读次数:
305