FreeBSD wifi ap

Allikas: Kuutõrvaja
Redaktsioon seisuga 8. august 2006, kell 10:48 kasutajalt Jj (arutelu | kaastöö)
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)

pccard_enable="YES" # Set to YES if you want to configure PCCARD devices. pccard_ifconfig="inet 10.0.0.2 netmask 255.255.255.0"


ipnat_enable="YES" ipnat_rules="/etc/ipnat.conf"

dhcpd_enable="YES" dhcpd_flags="-q" # command option(s) dhcpd_conf="/usr/local/etc/dhcpd.conf" # configuration file dhcpd_ifaces="wi0" # ethernet interface(s)

pccard_enable="YES" # Set to YES if you want to configure PCCARD devices.

  1. nati pordid

map ed0 192.168.0.0/24 -> 0.0.0.0/32 portmap tcp/udp 40000:65000 map ed0 192.168.0.0/24 -> 0.0.0.0/32

default-lease-time 21600; max-lease-time 7200; ddns-update-style none; log-facility local7; ignore client-updates;

subnet 192.168.3.0 netmask 255.255.255.0 {

 range 192.168.3.5 192.168.3.200;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.3.255;
 option routers 192.168.3.1;
 option domain-name-servers 194.126.115.18, 194.126.101.34;

}



wireless.sh

  1. !/bin/sh
  1. Created: 10 July 2002
  2. Maintained by: Steven N. Fettig - freebsd-ap@stevenfettig.com
  3. Last modified: 23 July 2002
  1. This script was created off suggestions found in:
  2. http://www.samag.com/documents/s=7121/sam0205a/sam0205a.htm
  3. For more information on the controls used in this script, PLEASE
  4. 'man wicontrol' - it is chock full of important settings/info.
  5. Remember also that 'wicontrol' is used for wi based PC Cards. If
  6. for example, you are using an Aeronet card, your actual command
  7. will be 'ancontrol'. Again, make sure to man xxxcontrol for the
  8. proper documentation.
  1. Set the channel of the wireless network to 5

wicontrol -f 5

  1. Set the wifi adapter to infrastructure mode - i.e. we do not
  2. want the network set in ad hoc mode.

wicontrol -p 1

  1. Set the extension of BSS to IBSS. Currently, the switch -c that
  2. changes that setting doesn't completely work for wicontrol but
  3. should in the future. Refer to 'man wicontrol' for more information.

wicontrol -c 1

  1. name the server and AP (this is primarily used for diagnostic
  2. controls see 'man wicontrol').

wicontrol -s "myap"

  1. Set the WEP key (change this accordingly)

wicontrol -k "12345"

  1. Enable WEP

wicontrol -e 1

  1. set the SSID of your AP

ifconfig wi0 ssid "myap"

  1. set the IP and netmask of the wifi card - this is going
  2. to be the gateway ip

ifconfig wi0 inet 10.2.3.1 netmask 255.255.255.0