Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Firewall rules

  1. #11
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

    Then I'll go back to my earlier question, are you doing 'su - root' with the hyphen? - that sets the environment correctly. You shouldn't need to specify /sbin/iptables as /sbin is in the path for root.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  2. #12
    rmvg is offline Advanced Member
    Join Date
    Sep 2005
    Location
    Calgary
    Posts
    208
    Rep Power
    9

    Default

    Quote Originally Posted by phoenix View Post
    Then I'll go back to my earlier question, are you doing 'su - root' with the hyphen? - that sets the environment correctly. You shouldn't need to specify /sbin/iptables as /sbin is in the path for root.
    is su -root any different that regular root besides i want ip tables to start as service when i reboot my machine.

    [root@canmail ~]# su - root
    [root@canmail ~]# /sbin/ip
    ip ip6tables-save iptables-restore
    ip6tables ipmaddr iptables-save
    ip6tables-restore iptables iptunnel
    [root@canmail ~]# /sbin/iptables
    iptables v1.3.5: no command specified
    Try `iptables -h' or 'iptables --help' for more information.
    Computer King

    http://www.computerking.ca

    Sales, Service, and Hosting
    Email, Data, and Web Packages
    Ask about web design specials

    Affiliates
    http://www.computerking.ca/pages/lin...affiliates.htm

  3. #13
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

    Quote Originally Posted by rmvg View Post
    is su -root any different that regular root besides i want ip tables to start as service when i reboot my machine.
    Yes, it is the hyphen '-' that ensures the correct environment is set for that user. It's exactly the same if you do 'su zimbra' rather than 'su - zimbra' - you'll get errors.

    Do an 'su - root' then try the command you did earlier:

    Code:
    service iptables status
    without the /sbin/ prefix. That should run OK and you should be able to make the changes you want.
    Last edited by phoenix; 09-03-2007 at 10:53 PM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #14
    rmvg is offline Advanced Member
    Join Date
    Sep 2005
    Location
    Calgary
    Posts
    208
    Rep Power
    9

    Default

    Am i missing something here? why is this being so difficult?

    [root@canmail c0mputerking]# su - root
    [root@canmail ~]# service iptables status
    /etc/sysconfig/iptables-config: line 53: *filter: command not found
    /etc/sysconfig/iptables-config: line 54: :INPUT: command not found
    /etc/sysconfig/iptables-config: line 55: :FORWARD: command not found
    /etc/sysconfig/iptables-config: line 56: :OUTPUT: command not found
    /etc/sysconfig/iptables-config: line 57: :RH-Firewall-1-INPUT: command not found
    /etc/sysconfig/iptables-config: line 58: -A: command not found
    /etc/sysconfig/iptables-config: line 59: -A: command not found
    /etc/sysconfig/iptables-config: line 60: -A: command not found
    /etc/sysconfig/iptables-config: line 61: -A: command not found
    /etc/sysconfig/iptables-config: line 62: -A: command not found
    /etc/sysconfig/iptables-config: line 64: -A: command not found
    /etc/sysconfig/iptables-config: line 65: -A: command not found
    /etc/sysconfig/iptables-config: line 67: -A: command not found
    /etc/sysconfig/iptables-config: line 68: -A: command not found
    /etc/sysconfig/iptables-config: line 69: -A: command not found
    /etc/sysconfig/iptables-config: line 70: -A: command not found
    /etc/sysconfig/iptables-config: line 71: -A: command not found
    /etc/sysconfig/iptables-config: line 72: -A: command not found
    /etc/sysconfig/iptables-config: line 73: -A: command not found
    /etc/sysconfig/iptables-config: line 74: -A: command not found
    /etc/sysconfig/iptables-config: line 75: -A: command not found
    /etc/sysconfig/iptables-config: line 77: -A: command not found
    /etc/sysconfig/iptables-config: line 78: -A: command not found
    /etc/sysconfig/iptables-config: line 79: -A: command not found
    /etc/sysconfig/iptables-config: line 80: -A: command not found
    /etc/sysconfig/iptables-config: line 81: -A: command not found
    /etc/sysconfig/iptables-config: line 82: -A: command not found
    /etc/sysconfig/iptables-config: line 83: -A: command not found
    /etc/sysconfig/iptables-config: line 84: -A: command not found
    /etc/sysconfig/iptables-config: line 85: -A: command not found
    /etc/sysconfig/iptables-config: line 86: -A: command not found
    /etc/sysconfig/iptables-config: line 87: -A: command not found
    /etc/sysconfig/iptables-config: line 89: -A: command not found
    /etc/sysconfig/iptables-config: line 90: COMMIT: command not found
    Firewall is stopped.


    Quote Originally Posted by phoenix View Post
    Yes, it is the hyphen '-' is what ensures the correct environment is set for that user. It's exactly the same if you do 'su zimbra' rather than 'su - zimbra' - you'll get errors.

    Do an 'su - root' then try the command you did earlier:

    Code:
    service iptables status
    without the /sbin/ prefix. That should run OK and you should be able to make the changes you want.
    Computer King

    http://www.computerking.ca

    Sales, Service, and Hosting
    Email, Data, and Web Packages
    Ask about web design specials

    Affiliates
    http://www.computerking.ca/pages/lin...affiliates.htm

  5. #15
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Can you uninstall/reinstall the firewall service/package?

  6. #16
    stlscott is offline Junior Member
    Join Date
    Aug 2007
    Posts
    5
    Rep Power
    7

    Default CENTOS 5 64-bit _ Same errors

    Just a side additional note.... I followed the instructions as well on my box and got the same errors, both with and without the - root. Also, got the same errors if I just logged in locally as root.

    Since I had other problems to resolve, I just turned off Iptables and set that project aside for another day.

    Since I got the same errors, I thought maybe the instructions may not be correct for RHEL5 (which is what CentOS 5 is).

    Thanks
    Scott

  7. #17
    imarks001's Avatar
    imarks001 is offline Active Member
    Join Date
    May 2006
    Location
    Reston, VA
    Posts
    34
    Rep Power
    9

    Default iptables

    It looks like you got your files mixed up. You edited /etc/sysconfig/iptables-config instead of /etc/sysconfig/iptables.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Rules du Jour - spamassassin
    By sturgis in forum Administrators
    Replies: 10
    Last Post: 11-27-2007, 10:12 AM
  2. zmtrainsa - can't find site rules
    By reza225 in forum Administrators
    Replies: 9
    Last Post: 07-09-2007, 12:19 PM
  3. Personal rules
    By Assaf in forum Administrators
    Replies: 1
    Last Post: 01-16-2007, 07:56 AM
  4. LDAP auth working only when firewall stopped
    By brousky in forum Installation
    Replies: 1
    Last Post: 09-19-2006, 06:32 AM
  5. Server behind firewall
    By VmarkV in forum Installation
    Replies: 3
    Last Post: 11-05-2005, 09:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •