Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I want to change the already written script of iptables and reflect the new changes. the step i am following are as .. Code: services iptables stop This stop ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    36

    How to edit iptables


    Hi,

    I want to change the already written script of iptables and reflect the new changes. the step i am following are as ..

    Code:
    services iptables stop
    This stop the iptables. and then i open the script file that has been written by some senior person and is placed at the following location
    Code:
    /etc/rc.d/rc.firewall
    after adding the extra ip's .. i restar the iptables
    Code:
    services iptables start
    Ideally, i should have been able to connect to the server through new IP's but i am still unable to. when i check the iptables status using this command
    Code:
    services iptables status
    I don't see any changes that i made (i.e no new ip table in accept). How would i make the changes in iptables?




    P.s:
    I have already read this tutorial iptables-save but this seems not working for me since we are using a script file.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You didn't tell use what distro you are using.
    Not every distro work the same so...

    I am willing to be that service iptables start isn't reading from the script you have modified.
    The above normally reads from a saved file the rules that are applied to the firewall unless this script iptables has been modified to read another file.

    If you want to use this rc.firewall script then you should run that not service iptables start.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    36
    Quote Originally Posted by Lazydog View Post
    You didn't tell use what distro you are using.
    Not every distro work the same so...

    I am willing to be that service iptables start isn't reading from the script you have modified.
    The above normally reads from a saved file the rules that are applied to the firewall unless this script iptables has been modified to read another file.

    If you want to use this rc.firewall script then you should run that not service iptables start.
    I guess it's fedora 4.

    how can i run that specific script .. ? what is the process .. ?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    It is as simple as '/<path>/<script>'
    As long as the permissions are set correctly.

    You GOOGLE is your friend!
    These are Linux Basic 101 questions.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Mar 2007
    Posts
    36
    Quote Originally Posted by Lazydog View Post
    It is as simple as '/<path>/<script>'
    As long as the permissions are set correctly.

    You GOOGLE is your friend!
    These are Linux Basic 101 questions.
    i ran the following commands on the server
    Code:
    service iptables stop
    service iptables start /etc/rc.d/rc.firewall
    and then i tried this command to check if the new ip's are in ACCEPT list
    Code:
    iptables -nv -L
    but no new ip are being shown

  7. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Code:
    service iptables stop
    /etc/rc.d/rc.firewall
    service iptables save

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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