This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linuxmce_ap [2016/01/23 19:45] – admin | linuxmce_ap [2016/01/23 22:04] – [Guest Network] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== LinuxMCE WLAN Access Point ====== | ====== LinuxMCE WLAN Access Point ====== | ||
- | / | + | ===== Install software ===== |
- | < | + | sudo apt-get install bridge-utils hostapd |
+ | ===== Run hostap ===== | ||
+ | |||
+ | sudo hostapd / | ||
+ | |||
+ | |||
+ | |||
+ | ===== Change firewall ===== | ||
+ | |||
+ | pluto main -> firewall -> IntIF -> eth0 to br0 | ||
+ | |||
+ | ===== Configs ===== | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | < | ||
##### | ##### | ||
# Loopback interface | # Loopback interface | ||
Line 25: | Line 40: | ||
# --- Internal NIC --- | # --- Internal NIC --- | ||
- | iface eth0 inet static | + | iface eth0 inet manual |
- | address 192.168.80.1 | + | |
- | netmask 255.255.255.0 | + | |
- | pre-up sysctl -q -e -w net.ipv6.conf.eth0.disable_ipv6=1 | + | |
- | # DNS Settings for Internal Net | + | |
- | dns-nameservers 192.168.80.1 | + | |
- | dns-search LinuxMCE | + | |
- | # --- Wlan0 --- | + | iface wlan0 inet manual |
- | iface wlan0 inet static | + | |
- | address 192.168.81.1 | + | |
- | netmask 255.255.255.0 | + | |
- | pre-up sysctl -q -e -w net.ipv6.conf.eth0.disable_ipv6=1 | + | |
- | dns-nameservers 192.168.81.1 | + | |
- | #iface br0 inet static | + | iface br0 inet static |
- | # bridge_ports eth0 wlan0 | + | |
- | # address 192.168.80.1 | + | |
- | # netmask 255.255.255.0 | + | |
- | # # DNS Settings for Internal Net | + | # DNS Settings for Internal Net |
- | # dns-nameservers 192.168.80.1 | + | |
- | # dns-search LinuxMCE | + | |
##### | ##### | ||
Line 53: | Line 57: | ||
auto dsl-provider eth0 wlan0 br0 lo | auto dsl-provider eth0 wlan0 br0 lo | ||
</ | </ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | |||
+ | <code config dhcpd.conf> | ||
+ | # | ||
+ | # Sample configuration file for ISC dhcpd for Debian | ||
+ | # | ||
+ | # $Id: dhcpd.conf, | ||
+ | # | ||
+ | |||
+ | # option definitions common to all supported networks... | ||
+ | option domain-name-servers 192.168.80.1; | ||
+ | option voip-tftp-server code 150 = ip-address; | ||
+ | option voip-tftp-server 192.168.80.1; | ||
+ | authoritative; | ||
+ | |||
+ | ddns-update-style interim; | ||
+ | ddns-updates on; | ||
+ | ddns-domainname " | ||
+ | ddns-rev-domainname " | ||
+ | update-static-leases on; | ||
+ | allow unknown-clients; | ||
+ | use-host-decl-names on; | ||
+ | |||
+ | |||
+ | include "/ | ||
+ | |||
+ | # Use what key in what zone | ||
+ | zone LinuxMCE. { | ||
+ | primary 127.0.0.1; | ||
+ | key " | ||
+ | } | ||
+ | |||
+ | option domain-name " | ||
+ | |||
+ | |||
+ | option routers 192.168.80.1; | ||
+ | option subnet-mask 255.255.255.0; | ||
+ | |||
+ | # lease IPs for 1 day, maximum 1 week | ||
+ | default-lease-time 86400; | ||
+ | max-lease-time 604800; | ||
+ | |||
+ | allow booting; | ||
+ | allow bootp; | ||
+ | |||
+ | option space pxelinux; | ||
+ | option pxelinux.magic code 208 = string; | ||
+ | option pxelinux.configfile code 209 = text; | ||
+ | option pxelinux.pathprefix code 210 = text; | ||
+ | option pxelinux.reboottime code 211 = unsigned integer 32; | ||
+ | |||
+ | subnet 192.168.80.0 netmask 255.255.255.0 { | ||
+ | next-server 192.168.80.1; | ||
+ | filename "/ | ||
+ | option pxelinux.reboottime = 30; | ||
+ | |||
+ | default-lease-time 86400; | ||
+ | max-lease-time 604800; | ||
+ | pool { | ||
+ | allow unknown-clients; | ||
+ | range 192.168.80.129 192.168.80.150; | ||
+ | range 192.168.80.152 192.168.80.199; | ||
+ | } | ||
+ | |||
+ | zone | ||
+ | primary localhost; | ||
+ | key " | ||
+ | } | ||
+ | zone LinuxMCE. { | ||
+ | primary localhost; | ||
+ | key " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | # PXE booting machines | ||
+ | group { | ||
+ | next-server 192.168.80.1; | ||
+ | filename "/ | ||
+ | option pxelinux.reboottime = 30; | ||
+ | |||
+ | |||
+ | } | ||
+ | |||
+ | # regular machines | ||
+ | group { | ||
+ | |||
+ | # Raspberry Pi Model B as MD (78) | ||
+ | host pc1 { hardware ethernet B8: | ||
+ | # NAS - NAS (27) | ||
+ | host pc2 { hardware ethernet 00: | ||
+ | } | ||
+ | |||
+ | # The following machines did not have a valid MAC address assigned in the database. | ||
+ | # You may want to correct this manually via the web admin. | ||
+ | # CORE (1) has bad mac address: | ||
+ | |||
+ | |||
+ | # Custom additions to the dhcpd conf file should be maintained in this | ||
+ | # extra file. | ||
+ | include "/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== / | ||
+ | |||
+ | <code config isc-dhcp-server> | ||
+ | INTERFACES=" | ||
+ | </ | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | <code config hostapd.conf> | ||
+ | interface=wlan0 | ||
+ | bridge=br0 | ||
+ | driver=nl80211 | ||
+ | ssid=test | ||
+ | hw_mode=g | ||
+ | channel=1 | ||
+ | macaddr_acl=0 | ||
+ | auth_algs=1 | ||
+ | ignore_broadcast_ssid=0 | ||
+ | wpa=3 | ||
+ | wpa_passphrase=1234567890 | ||
+ | wpa_key_mgmt=WPA-PSK | ||
+ | wpa_pairwise=TKIP | ||
+ | rsn_pairwise=CCMP | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== / | ||
+ | |||
+ | <code config hostapd> | ||
+ | # Defaults for hostapd initscript | ||
+ | # | ||
+ | # See / | ||
+ | # methods of managing hostapd. | ||
+ | # | ||
+ | # Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration | ||
+ | # file and hostapd will be started during system boot. An example configuration | ||
+ | # file can be found at / | ||
+ | # | ||
+ | # | ||
+ | DAEMON_CONF="/ | ||
+ | |||
+ | # Additional daemon options to be appended to hostapd command:- | ||
+ | # -d show more debug messages (-dd for even more) | ||
+ | # -K | ||
+ | # -t | ||
+ | # | ||
+ | # Note that -B (daemon mode) and -P (pidfile) options are automatically | ||
+ | # configured by the init.d script and must not be added to DAEMON_OPTS. | ||
+ | # | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ====== Guest Network (IGNORE) ====== | ||
+ | |||
+ | old mac address: | ||
+ | | ||
+ | 10: | ||
+ | | ||
+ | change it to **02**: | ||
+ | |||
+ | ifconfig wlan0 down | ||
+ | ifconfig wlan0 hw ether 02: | ||
+ | ifconfig wlan0 up | ||
+ | |||
+ |