Results 1 to 5 of 5

Thread: Where's the configuration stored?

  1. #1
    Join Date
    Feb 2005
    Location
    Haugesund, Norway
    Posts
    18

    Where's the configuration stored?

    Hi,

    I was wondering if there is an overview of where the various settings (or built-in scripts) are stored in the 500g?

    For instance, I enabled wireless access control to reject one specific MAC-address, but in which file (if any) is this setting stored? I assumed that it would be added to iptables, but it wasn't.

    Is there an easy way of "tunneling" specific computers to only have access to the internet, and not to the local network? I assume that iptables is the way to go, but to which chains do I add the rules? (I do know how to use the post-firewall script to add rules).

    Regards,
    -Øyvind

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Wireless MAC address filtering is done by wireless driver itself.
    The settings are get stored in the flash area called NVRAM. Use nvram command to view it.

  3. #3
    That would be the FORWARD chain. You should try this tutorial on iptables:
    http://iptables-tutorial.frozentux.n...s-tutorial.htm
    Spesifically this part:
    http://iptables-tutorial.frozentux.n...ERSINGOFTABLES

    It's quite an extensive but very good tutorial.

    You need rules that looks something like
    Code:
    iptables -A FORWARD -s 192.168.1.x -d 192.168.1.0/255.255.255.0 -j DROP
    I.e. packets from computer 192.168.1.x to local network addresses shoul be dropped. I guess you can even spesify the oposite, form lan to computer to be dropped.

    Instead of using the built in wlan mac access control you can make it your self with iptables. I use this script for that:
    Code:
    #!/bin/sh
    mac=""
    for ip in `cat /usr/local/etc/ethers`
    do
      if [ `expr substr $ip 1 7` = "192.168" ] ; then
            #echo $ip
            iptables -A FORWARD -s $ip -m mac --mac-source $mac -j ACCEPT
      else
            mac=$ip
      fi
    done
    iptables -A FORWARD -j DROP
    All mac/ip pairs in /usr/local/etc/ethers are copied to /etc/ethers.

    B.
    PS:Heia Norge!

  4. #4
    Join Date
    Feb 2005
    Location
    Haugesund, Norway
    Posts
    18
    Thanks, both of you!

    Barsju, the script you mentioned, is that also part of the post-firewall script?
    Besides, there is no /usr/local/etc/ethers file on my router, do you create that manually?

    And I agree:
    Heia Norge! :-)

  5. #5
    Quote Originally Posted by oyvindk
    Barsju, the script you mentioned, is that also part of the post-firewall script?
    Well I have it as a separate script that I call from post-firewall.

    Besides, there is no /usr/local/etc/ethers file on my router, do you create that manually?
    Yepp. Check out /etc/ethers to see what it should look like. What ever you write in /usr/local/etc/ethers is copied to /etc/ethers. (Same with /etc/hosts by the way.. if you want to name your hosts, or use it for filtering.)

    B

Similar Threads

  1. Samba configuration
    By ACluk90 in forum WL-500g Q&A
    Replies: 4
    Last Post: 06-07-2005, 15:55
  2. Help, cannot acces configuration.html!!
    By styx in forum WL-HDD Q&A
    Replies: 5
    Last Post: 06-02-2005, 20:28
  3. Q: Where are the settings stored?
    By Alice in forum WL-500g Custom Development
    Replies: 1
    Last Post: 22-01-2005, 16:23
  4. USB configuration question?
    By plee in forum WL-HDD Q&A
    Replies: 2
    Last Post: 05-01-2005, 19:29
  5. building a new configuration menu
    By Antiloop in forum WL-500g Custom Development
    Replies: 0
    Last Post: 04-01-2004, 20:47

Posting Permissions

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