|
发表于 2005-10-11 16:11:41
|
显示全部楼层
Post by zaiwen
So there is no way to assign ypserv a specific port? 55555
About open port, today I happened to do some tests about security and notice something very very very confusing that I would like to consult with u.
1. If I ENABLE firewall, don't add any trusted ports/devices or other ports, then use iptables to add rule to open ports, but it doesn't work.
a. "iptables -F " to clean up everything.
b. system-config-securitylevel, just enable firewall, nothing else.
c. iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 23 -j ACCEPT
d. service iptables save
e. try to telnet from 192.168.x.x, but failed. ?????
But if I enable firewall and specify telnet as trusted port using the gui, it works fine. This sounds very weired...I thought it should behave the same no matter you use the gui or use iptables. Any clue?
2. If I DISABLE firewall, then use iptables to drop ports, it works fine.
a. "iptables -F " to clean up everything.
b. system-config-securitylevel, disable firewall.
c. iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 23 -j DROP
d. service iptables save
e. try to telnet from 192.168.x.x, it can't, as expected.
It seems all my iptables only work when firewall is disabled. I thought iptables should add rules to your existing enabled firewall. Am I wrong?
I haven't had chance to try your suggestion of open port 1-1024, but it sounds very similar to my first test. To open port 1-1024, I need to enable firewall, right? (Disable firewall alone means all ports are already open The only difference between my test and your suggestion is that I only open one port 23 while you open all 1-1024. If one doesn't work, can I expect all to work? If I can't figure this out, does it mean I have to add all 1024 ports manully using the gui? hehe.....
Anyway I will try yours tomorrow, but maybe I can get more reply from you before I try......your expertise might save me hours of struggling in the darkness.
Again, thanks a lot!!! I really appreciate all your reply.
why not try
and take a look when you enabled the firewall? (Tips: firewall rules policy is alway blocking everything at the last rule, so *APPEND* rules after that will just useless... |
|