leoynx 发表于 2016-3-22 11:56:13

设置了iptables结果扶墙的挂了

本帖最后由 leoynx 于 2016-3-23 14:00 编辑

想向元老们学习防火墙设置,结果扶墙的挂了,不过ssh的倒是没问题...
[*]
[*]iptables -F
[*]iptables -A INPUT -m state --state ESTABLISH,RELATED -j ACCEPT
[*]iptables -A INPUT -m state --state INVALID -j DROP
[*]iptables -A INPUT -p tcp -m multiport --sport 53,80,443 -j ACCEPT #第一条规则失效,所以补上端口
[*]iptables -A INPUT -p tcp --dport 22 -j ACCEPT
[*]iptables -A INPUT -p tcp --dport 8388 -j ACCEPT
[*]iptables -A INPUT -i lo -j ACCEPT
[*]iptables -A INPUT -p icmp -j ACCEPT
[*]iptables -P INPUT DROP
[*]复制代码扶墙口8388

qweasdzxc123 发表于 2016-3-22 12:08:34

[*]iptables -F
[*]iptables -A INPUT -m state --state ESTABLISH,RELATED -j ACCEPT复制代码

你是故意打错?还是真的那么弄的?

另外怎么个挂法?说清楚啊,让我们给你猜?

查无此人 发表于 2016-3-22 12:18:05

那种扶墙 请打开对应端口

hising 发表于 2016-3-22 12:22:33


qweasdzxc123 发表于 2016-3-22 12:08

你是故意打错?还是真的那么弄的?

另外怎么个挂法?说清楚啊,让我们给你猜? ...
复制的时候黏在一起了,现在分开了

ss日志和本地日志一点错误都没有...

leoynx 发表于 2016-3-22 12:48:11


hising 发表于 2016-3-22 12:22

那种扶墙 请打开对应端口
开了呀 tcp的8388

leoynx 发表于 2016-3-22 12:08:00

你的OUTPUT呢,全部允许么

the2ndface 发表于 2016-3-22 12:49:56


the2ndface 发表于 2016-3-22 14:04

你的OUTPUT呢,全部允许么
是啊.全部允许. 照理说ssh没问题,ss也应该没问题的

leoynx 发表于 2016-3-22 12:22:00

换个端口试一把

the2ndface 发表于 2016-3-22 14:04:12

本帖最后由 leoynx 于 2016-3-22 22:56 编辑

the2ndface 发表于 2016-3-22 21:43

换个端口试一把

同样的规则在hostus小鸡上就行,virmach就不行,然后换了个系统版本,狗血的事情发生了,正常跑起来了!然后在换回去,发现发现发现,正常了!所以说坑死我了.......................弄毛的防火墙~~~~我都关了
lol.gif

leoynxbluekyo 发表于 2016-3-22 16:52:27

同样遇到这个问题,加:
iptables -A INPUT -p tcp --dport 8388 -j ACCEPT
ss还是不能连
页: [1] 2
查看完整版本: 设置了iptables结果扶墙的挂了