Find the answer to your Linux question:
Results 1 to 6 of 6
how do i look the configuration of firewall on linux? thanks...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29

    Configure Firewall


    how do i look the configuration of firewall on linux?

    thanks

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    What distro are you using?

    Typically, you can list the iptables rules with:
    Code:
    iptables -L
    and you can print them in a config file format with:
    Code:
    iptables --save

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29
    hi,

    im using Centos on the server, and i have tried your command but it just return "command not found"

    thanks

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Did you run the iptables command as a regular user, or as root? I should have mentioned you must be root (iptables is in /sbin which is not in the regular user's path). You could also try:

    Code:
    /sbin/iptables -L
    But if you get the "No such file or directory" error, see if the package is installed:

    Code:
    rpm -qv iptables
    I'd be surprised if it is not installed, b/c it is one of those packages that is always installed, no matter how small an install you choose. Anyway, you can install it with:

    Code:
    yum install iptables
    Or if yum is not yet set up, get the RPM from your original installation media and install it, e.g.:

    Code:
    rpm -ivh /media/dvd/CentOS/iptables-[0-9].*.rpm
    Then start it with:

    Code:
    service iptables start
    Note: do the yum/rpm/service commands as root

  5. #5
    Just Joined!
    Join Date
    Jul 2011
    Posts
    29
    after lunched the command "/sbin/iptables -L" it show me that all connection are allowed

    then, i have configured snmp on these linux, but why occasionally it doesnt work as i expected ? sometimes my snmp manager server could communicate with my linux through SNMP, but next time the connection is lost

    i have using snmpwalk to test it and its working fine

    any suggestions ?

    btw thanks for your big help, it's really2 helping me

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    So what exactly is the role of your Linux machine in regards to your SNMP environment? Is it supposed to be acting as an SNMP managed device (running an agent and reporting to an SNMP manager)? Or are you just using it to verify that another SNMP device is working (which your use of the snmpwalk command suggests)?

    Show any commands that you have tried, and what the exact errors you get, if any.

Posting Permissions

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