求助iptables 访问断口

luesfeng
求助iptables 访问断口

服务器地址 202.106.193.12  是个虚拟主机
装了个ntop  但是谁都可以随便访问
想用iptables 限制只能有我的本地地址125.33.150.197   访问
iptables -A INPUT -p tcp -s 125.33.150.197 --dport 3000 -j ACCEPT
iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 3000 -j DROP
不好使 结果我本地也访问不了  不知道哪里出了问题 ,是不是我的iptables写错了:em14: :em14: :em14:

luesfeng
没有做其他的  iptables 限制

happyc84
iptables -L  结果贴出来
如果就这两条 应该没问题的
顺序不能错啊, 错了就会导致你自己有连不上

jackshan
iptables -A INPUT -i eth0  -p tcp --dport 3000 -j REJECT

luesfeng
[root@vhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  125.33.150.197       anywhere            tcp dpt:3000
DROP       tcp  --  anywhere             anywhere            tcp dpt:3000

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

luesfeng
jackshan 给的也不能用!

luesfeng
ntop 默认是不要密码的 ,怎么让他访问需要密码
有就是不能够随便访问

kenduest
本機不設防。

iptables -A INPUT -i lo -j ACCEPT

--

7717060
你看看丢包有数据吗?如果有说名好用或你端口有是否改了,不是那个

llzqq
[quote]原帖由 [i]kenduest[/i] 于 2008-3-12 02:25 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6523431&ptid=982069][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
本機不設防。

iptables -A INPUT -i lo -j ACCEPT

-- [/quote]

原因应该就是这个,LZ加上这个试试

luesfeng
好了好了 就是这个
:em02: :em02: :em02: :em02:
iptables -A INPUT -i lo -j ACCEPT