The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Blocking open ports on Linux!!!

Discussion in 'General Discussion' started by atul, Jul 20, 2004.

  1. atul

    atul Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hello All,
    I am using APF and iptables firewall on different server.I have two questions ? CAn i use both iptables and APF simultaneously.I think I can't .But can anybody justify it.
    Second thing is that I want to block port 631 on our local server.
    I have tried this for it:
    I have added entries in deny_host file in apf directory.. as :
    tcp:in:d=631:s=0.0.0.0
    then
    apf -s
    But it is working ?Why?
    Help me !!! How should I block port ?
    Thanks you
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Erm, APF is an iptables firewall. You cannot configure your own iptables rules and use APF as APF will simply get rid of them. You don't block ports that way with APF. You should edit /etc/apf/conf.apf and look for IG_TCP_CPORTS and remove the port that you don't want to be open from there. Then run apf -r to restart it.
     
Loading...

Share This Page