Find the answer to your Linux question:
Results 1 to 4 of 4
# ================================================== =========================== # block kids : nate 23: tim d9: bob 78: rae 2f: # ================================================== =========================== #REJECT lan0:~00-10-4B-2E-6A-23 inet all #REJECT lan0:~00-04-5A-6B-9D-78 inet all #REJECT lan0:~00-12-17-72-A0-2F inet all ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2

    turning off and on the kids internet access.


    # ================================================== ===========================
    # block kids : nate 23: tim d9: bob 78: rae 2f:
    # ================================================== ===========================
    #REJECT lan0:~00-10-4B-2E-6A-23 inet all
    #REJECT lan0:~00-04-5A-6B-9D-78 inet all
    #REJECT lan0:~00-12-17-72-A0-2F inet all
    #REJECT lan0:~00-08-A1-1D-DF-D9 inet all
    ================================================== ===========================
    This is the rules I am currently using they work great.
    All I do is rem out the statement and restart shorewall to give the kids access.
    I rem out only one to block all but say bob bobs mac address ends in 78
    so i rem out the REJECT lan0:~00-04-5A-6B-9D-78 inet all to allow bob out to the internet.
    then when I want to block them again I un-rem the rule , restart shorewall and they are blocked again.
    but I want to be able to automate it where I can make a intranet page for my wife to log in to click a button and turn off and on the kids internet.

    Is there any way I can make the changes to shorewall/iptables using a script or some other way of being able to automate these changes?
    Or am i stuck with teaching her to log in ssh and editing the rules file and restarting the shorewall?

    thanks for your help in advance.

    Robert Harvey

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    put the exact commands you do now to change it in a file.
    put the #!/bin/bash line as first line in there.
    save the file
    chmod +x it.
    done.. ^^

    Check the Scripting part for this. It has more to do with Scripting then with security.
    New Users, please read this..
    Google first, then ask..

  3. #3
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    You could create two instances of the configuration and use a script to rename the config files and restart the service as Robin mentioned. Another alternative if you just want content filtering would be :-

    DansGuardian - True Web Content Filtering for All

  4. #4
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2
    so your saying this is really a scripting issue.
    which forum should i post it in?
    thanks
    Robert

Posting Permissions

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