Forum
Xbian working as an Access Point for WLAN0 - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: CuBox-i / Hummingboard (/forum-66.html)
+--- Forum: Configuration (/forum-72.html)
+--- Thread: Xbian working as an Access Point for WLAN0 (/thread-3236.html)



Xbian working as an Access Point for WLAN0 - duno - 6th Dec, 2015 12:56 AM

Hi, i have a question about Xbian working as an Access Point on an RPI2.

I Installed build-essential, htop, mc, hostapd, bind9, nslint, isc-dhcp-server, apache2, squid3, openssh-server, ntp, locate, nmap, tcpdump, wireshark, psmisc, tree, vim, apt-file, aptitude, hwinfo, lsscsi, lvm2, mdadm, xfsprogs, cups, nfs-kernel-server, samba, cryptsetup, rsync, incron and autofs

LAN=WAN (Router)
WLAN= AP with WPS2

First Problem:
lvm2 (2.02.111-2.2) wird eingerichtet ...
[....] Setting up LVM Volume Groups... No volume groups found
done.
update-initramfs: deferring update (trigger activated)
liblvm2cmd2.02:armhf (2.02.111-2.2) wird eingerichtet ...
Trigger für libc-bin (2.19-18+deb8u1) werden verarbeitet ...
Trigger für initramfs-tools (0.120) werden verarbeitet ...
update-initramfs: Not updating initramfs.
Trigger für systemd (215-17+deb8u2) werden verarbeitet ...
root@xbian:/home/xbian#

Second Problem:

sudo su

cd /etc/dhcp/
vim dhclient.conf
Code:
#*************************************************
request subnet-mask, broadcast-address, time-offset, routers,
#       domain-name, domain-name-servers, domain-search, host-name,
#       dhcp6.name-servers, dhcp6.domain-search,
#       netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers;
#*************************************************

vim /etc/resolv.conf
Code:
#*************************************************
search guest.int
nameserver 10.10.10.1
#*************************************************

vim /etc/network/interfaces

Code:
#*************************************************

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
#dhcp
address 192.168.0.45
netmask 255.255.255.0
gateway 192.168.0.240
dns-servers 10.10.10.1

allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
#dhcp
address 10.10.10.1
netmask 255.255.255.0
gateway 192.168.0.45
dns-servers 10.10.10.1
dns-search guest.int
#*************************************************

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Code:
cat /proc/sys/net/ipv4/ip_forward -> 1

Code:
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE

vim /etc/sysctl.conf
Code:
#net.ipv4.ip_forward=1
# delete the "#"

vim /etc/rc.local
Code:
#*************************************************
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
#*************************************************
exit 0
#*************************************************

Code:
cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.orig

vim /etc/dhcp/dhcpd.conf

Code:
ddns-update-style none;
option domain-name "guest.int";
option domain-name-servers 10.10.10.1;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.240 10.10.10.250;
option routers 192.168.0.45;
}
vim /etc/default/hostapd
touch /etc/hostapd/hostapd.conf
vim /etc/hostapd/hostapd.conf
Code:
#*************************************************
### Wireless network name ###
interface=wlan0
### Set your bridge name ###
bridge=br0
### Set your driver name ###
driver=nl8021
### (IN == INDIA, UK == United Kingdom, US == United Stats and so on ) ###
country_code=US
### Set your SSID:
ssid=guest
### Set operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g)
hw_mode=g
### Set channel number (some driver will only use 0 as value)
channel=6
### Set wpa mode to 2:
wpa=2
### Set your passphrase (WiFi password):
wpa_passphrase=GuEsT123
## Key management algorithms ##
wpa_key_mgmt=WPA-PSK
## TKIP = Temporal Key Integrity Protocol
## CCMP = AES in Counter mode with CBC-MAC
wpa_pairwise=TKIP
rsn_pairwise=CCMP
## Shared Key Authentication ##
auth_algs=1
## Accept all MAC address ###
macaddr_acl=0
#*************************************************

/etc/init.d/hostapd restart

I got an error:

Code:
[ ok ] Stopping advanced IEEE 802.11 management: hostapd.
[FAIL] Starting advanced IEEE 802.11 management: hostapd failed!

journalctl told me nothing and there is no /var/log/daemon.log

What is the problem? And how can I figure out by myself?

BTW: I do not like to BRIDGE from ETH0 to WLAN0, is that my problem?


RE: Xbian working as an Access Point for WLAN0 - duno - 28th Jan, 2016 03:04 AM

(6th Dec, 2015 12:56 AM)duno Wrote:  journalctl told me nothing and there is no /var/log/daemon.log

What is the problem? And how can I figure out by myself?

Ok, it is working like a charm. I am able to connect clients via wlan0 with bind9 and isc-dhcp-server, next step is DNSSEC and DDNS.

But, in the moment I only can use dmesg to control/read iptables-rules.

That's not so pretty/nice.

I need some help with the journalctl.
Please, can someone help?


RE: Xbian working as an Access Point for WLAN0 - Nachteule - 28th Jan, 2016 10:20 AM

journalctl does not work because upstart is used.

So please install and run a logger (syslog, syslog-ng, rsyslog [1]) for having syslogs.


[1] I'm using rsyslog and redirecting all messages to my server


RE: Xbian working as an Access Point for WLAN0 - tijundonghua60 - 11th Aug, 2022 01:31 PM

(28th Jan, 2016 03:04 AM)duno Wrote:  
(6th Dec, 2015 12:56 AM)duno Wrote:  journalctl told me nothing and there is no /var/log/daemon.log

What is the problem? And how can I figure out by myself?

Ok, it is working like a charm. I am able to connect clients via wlan0 with bind9 and isc-dhcp-server, next step is DNSSEC and DDNS.drift f1

But, in the moment I only can use dmesg to control/read iptables-rules.

That's not so pretty/nice.

I need some help with the journalctl.
Please, can someone help?
Why do some people say it works and others don't? I will test this problem.