User Tools

Site Tools


linuxmce_ap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
linuxmce_ap [2016/01/23 19:45] adminlinuxmce_ap [2016/03/16 18:19] – [Change firewall] admin
Line 1: Line 1:
 ====== LinuxMCE WLAN Access Point ====== ====== LinuxMCE WLAN Access Point ======
  
-/etc/network/interfaces+===== Install software =====
  
-<code>+  sudo apt-get install bridge-utils hostapd 
 +===== Run hostap ===== 
 + 
 +  sudo hostapd /etc/hostapd/hostapd.conf 
 + 
 + 
 + 
 + 
 +===== Configs ===== 
 + 
 +==== /etc/network/interfaces ==== 
 + 
 +<code config interfaces>
 ##### #####
 # Loopback interface # Loopback interface
Line 25: Line 37:
  
 # --- 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 +         post-up /usr/sbin/hostapd -B /etc/hostapd/hostapd.conf 
-        address 192.168.80.1 +         post-up service isc-dhcp-server restart 
-        netmask 255.255.255.0 +         bridge_ports eth0 wlan0 
-         # DNS Settings for Internal Net +         address 192.168.80.1 
-        dns-nameservers 192.168.80.1 +         netmask 255.255.255.0 
-        dns-search LinuxMCE+          # DNS Settings for Internal Net 
 +         dns-nameservers 192.168.80.1 
 +         dns-search LinuxMCE
  
 ##### #####
Line 53: Line 56:
 auto dsl-provider eth0 wlan0 br0 lo auto dsl-provider eth0 wlan0 br0 lo
 </code> </code>
 +
 +==== /etc/dhcp/dhcpd.conf ====
 +
 +
 +<code config dhcpd.conf>
 +#
 +# Sample configuration file for ISC dhcpd for Debian
 +#
 +# $Id: dhcpd.conf,v 1.4.2.2 2002/07/10 03:50:33 peloy Exp $
 +#
 +
 +# 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 "LinuxMCE";
 +ddns-rev-domainname "in-addr.arpa.";
 +update-static-leases on;
 +allow unknown-clients;
 +use-host-decl-names on;
 +
 +
 +include "/etc/bind/rndc.key";
 +
 +# Use what key in what zone
 +zone LinuxMCE. {
 + primary 127.0.0.1;
 + key "rndc-key";
 +}
 +
 +option domain-name "LinuxMCE";
 +
 +
 +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 "/tftpboot/pxelinux.0";
 + 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   80.168.192.in-addr.arpa. {
 + primary localhost;
 + key "rndc-key";
 + }
 + zone    LinuxMCE. {
 + primary localhost;
 + key "rndc-key";
 + }
 +
 +}
 +
 +# PXE booting machines
 +group {
 + next-server 192.168.80.1;
 + filename "/tftpboot/pxelinux.0";
 + option pxelinux.reboottime = 30;
 +
 +
 +}
 +
 +# regular machines
 +group {
 +
 + # Raspberry Pi Model B as MD (78)
 + host pc1 { hardware ethernet B8:27:EB:91:2A:45; fixed-address 192.168.80.2; }
 + # NAS - NAS (27)
 + host pc2 { hardware ethernet 00:11:32:1D:00:07; fixed-address 192.168.80.151; }
 +}
 +
 +# 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 "/etc/dhcp/dhcpd-extra.conf";
 +
 +</code>
 +
 +
 +==== /etc/default/isc-dhcp-server ====
 +
 +<code config isc-dhcp-server>
 +INTERFACES="br0"
 +</code>
 +
 +==== /etc/hostapd/hostapd.conf ====
 +
 +<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>
 +
 +
 +==== /etc/default/hostapd ====
 +
 +<code config hostapd>
 +# Defaults for hostapd initscript
 +#
 +# See /usr/share/doc/hostapd/README.Debian for information about alternative
 +# 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 /usr/share/doc/hostapd/examples/hostapd.conf.gz
 +#
 +#DAEMON_CONF=""
 +DAEMON_CONF="/etc/hostapd/hostapd.conf"
 +
 +# Additional daemon options to be appended to hostapd command:-
 +# -d   show more debug messages (-dd for even more)
 +# -K   include key data in debug messages
 +# -t   include timestamps in some debug messages
 +#
 +# 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.
 +#
 +#DAEMON_OPTS=""
 +</code>
 +
 +====== Guest Network (IGNORE) ======
 +
 +old mac address:
 +  
 +  10:9a:dd:c3:67:c4
 +  
 +change it to **02**:9a:dd:c3:67:**30** using (bold values are required, the middle part can be taken from the original mac address):
 +
 +  ifconfig wlan0 down
 +  ifconfig wlan0 hw ether 02:9a:dd:c3:67:30
 +  ifconfig wlan0 up 
 +
 +
linuxmce_ap.txt · Last modified: 2016/07/22 22:24 by admin