Translate

Wednesday, August 6, 2014

Tips and Tricks:NetBSD :: rc.conf sample file for DHCP and WPA Supplicant

This is just a sample based on my own settings.
Enjoy! :)


#       $NetBSD: rc.conf,v 1.96 2000/10/14 17:01:29 wiz Exp $
#
# see rc.conf(5) for more information.
#
# Use program=YES to enable program, NO to disable it. program_flags are
# passed to the program on the command line.
#

# Load the defaults in from /etc/defaults/rc.conf (if it's readable).
# These can be overridden below.
#
if [ -r /etc/defaults/rc.conf ]; then
        . /etc/defaults/rc.conf
fi

# If this is not set to YES, the system will drop into single-user mode.
#
rc_configured=YES

# Add local overrides below
#
hostname=bit

# This enables dhcp client  for all interfaces
# If you want to restrict or limit configuration, please
# take a look at dhcpcd.conf(5).
#dhcpcd=YES

# This is for stopping lease waiting if AP is out of reach
dhcpcd_flags="-q -b"

# Interfaces to be configured.
#
# Sets the net_interfaces variable to the output of ifconfig(8)
# with the ``-l'' flag and suppresses warnings about interfaces in
# this list that do not have an ifconfig file or variable
#auto_ifconfig=YES

# For each interface xxN, the system first looks for ifconfig
# parameters in the variable ifconfig_xxN, and then in the file
# /etc/ifconfig.xxN.
# Information in either the variable or the file is parsed
# identically, except that, if the variable contains a single
# line with embedded semicolons, the the value is split into
# multiple lines prior to further parsing, treating the semicolon
# as a line separator.
net_interfaces="re0 urtw0"

# This is overridden because we have /etc/ifconfig.xxN files ;-)
#ifconfig_re0=dhcp
#ifconfig_urtw0=dhcp

# This tells how to use wPA Supplicant
wpa_supplicant=YES
wpa_supplicant_flags="-B -i urtw0 -c /etc/wpa_supplicant.conf"

# Services
sshd=YES
ntpdate=YES
wscons=YES

Tuesday, August 5, 2014

Tips and Tricks:NetBSD :: WPA Supplicant configuration

This is just a sample configuration for wpa_supplicant.
You can download it to /etc/wpa_supplicant.conf and ajust to your needs!

enjoy! :)

# This is an example file.

# WPA Supplicant stuff
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

# Network configurations
# network={
#    ssid="AP_NAME"
#
#    # a higher value means a network is more desirable.
#    # By default networks have priority 0.
#    priority=10
#
#    # Technique 0 scans for the
#    # SSID using a broadcast Probe Request frame while 1 uses a
#    # directed Probe Request frame.  Access points that cloak them-
#    # selves by not broadcasting their SSID require technique 1, but
#    # beware that this scheme can cause scanning to take longer to complete
#    scan_ssid=0
#
#    # WPA-PSK (WPA pre-shared key), WPA-EAP (WPA using EAP authentication)
#    # IEEE8021X (IEEE 802.1x using EAP authentication and,
#    # optionally, dynamically generated WEP keys), NONE (plaintext or
#    # static WEP keys).
#    # If not set this defaults to "WPA-PSK WPA-EAP".
#    key_mgmt=WPA-PSK
#
#    psk="network_password"
#
#}

#network={
#    ssid="MYUNPROTECTEDWLAN"
#    scan_ssid=1
#    key_mgmt=NONE
#    priority=100
#}

#network={
#    ssid="MYWEAKLYENCRYPTEDWLAN"
#    key_mgmt=NONE
#    wep_key0="12345"  # or 13 characters, or a hexkey starting with 0x
#    wep_tx_keyidx=0
#}


# home network; allow all valid ciphers
network={
    ssid="home_AP"
    priority=100
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="123456789"
}

## work network;
#network={
#    ssid="library_AP"
#    priority=1
#    scan_ssid=1
#    key_mgmt=WPA-PSK
#    psk="123456789"
#}

## work network;
#network={
#    ssid="board_ap"
#    priority=2
#    scan_ssid=1
#    key_mgmt=WPA-PSK
#    psk="123456789"
#}
#