User Tools

Site Tools


linuxmce_ap

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
linuxmce_ap [2016/01/23 19:44] – created adminlinuxmce_ap [2016/03/16 18:19] – [Change firewall] 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 /etc/hostapd/hostapd.conf
 +
 +
 +
 +
 +===== Configs =====
 +
 +==== /etc/network/interfaces ====
 +
 +<code config interfaces>
 +#####
 +# Loopback interface
 +#####
 +iface lo inet loopback
 +
 +#####
 +# xDSL PPPoE interface
 +#####
 +iface dsl-provider inet ppp
 + pre-up    /sbin/ifconfig eth1 up
 + up /etc/wide-dhcpv6/dhcp6c-ifupdown start
 + down /etc/wide-dhcpv6/dhcp6c-ifupdown stop
 + provider dsl-provider
 +
 +#####
 +# IPv4 network interfaces
 +#####
 +
 +# --- External NIC ---
 +
 +# --- Internal NIC ---
 +iface eth0 inet manual
 +
 +iface wlan0 inet manual
 +
 +iface br0 inet static
 +         post-up /usr/sbin/hostapd -B /etc/hostapd/hostapd.conf
 +         post-up service isc-dhcp-server restart
 +         bridge_ports eth0 wlan0
 +         address 192.168.80.1
 +         netmask 255.255.255.0
 +          # DNS Settings for Internal Net
 +         dns-nameservers 192.168.80.1
 +         dns-search LinuxMCE
 +
 +#####
 +# Activating interfaces
 +#####
 +auto dsl-provider eth0 wlan0 br0 lo
 +</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