Objective: To use a wired connection network and use Mentohust to authenticate ruijie. the wireless network is configured as AP hotspot shared Internet access.
1. configure a wired network
Edit
nano /etc/network/interfaces
Comment out DHCP and configure static IP addresses and MAC addresses
:XX:XX:XX...
Configure DNS Server
nano /etc/resolv.conf
Add a Google Dns address
nameserver ..
Save and restart the network service
/etc/init.d/networking restart
Ii. Install Mentohust
Install libpcap first
apt-get libpcap-dev
apt-get autotools-dev libgtk2.-dev libscim-dev libtool automake1.
Mentohust source code preparation
git clone https: autogen.
Compile and install
./configure --prefix=/ &&
Grant Super User Permissions to programs (optional)
u+s /usr/bin/mentohust
Configure Mentohust
Welcome to the MentoHUST version :. ---- k -------- g gateway [Default 0 .. -s DNS [Default 0 .. -o Ping host [Default 0 .. ----- a multicast address: (standard) (ruijie)-d DHCP mode: (not used) (Secondary authentication) (after authentication)-B running in the background: (No) (Yes, disable the output) (yes, retain the output)-y show notification: (NO )~ ---- Q: SuConfig is displayed. dat content (for example,-q/path/-uusername-ppassword-neth0-i192 .. -m255 .. -g0 .. -s0 .. -o0 .. -t8-e30-r15-a0-d1-b0-v4.-fdefault. mpf-
3. configure a wireless network
Install wireless NIC Driver, take EDUP EP-N8508GS, 8188cuz chip as an example.
Obtain the source code of the kernel header.
cd /usr/ https: xvfz rpi-.y. KVER=` - linux-rpi-.y linux- cd linux-$KVER/ -i /proc/config.gz > https: -s /usr/src/linux-$KVER /usr/src/ -s /usr/src/linux-$KVER /lib/modules/$KVER/ -s /usr/src/linux-$KVER /lib/modules/$KVER/ exit
http: RTL8192xC_USB_linux_v3..4_4749.. cd RTL8188C_8192C_USB_linux_v3..4_4749./driver/ upzip rtl8188C_8192C_usb_linux_v3..4_4749.. cd rtl8188C_8192C_usb_linux_v3..4_4749.
Modify the Makefile file and find the following configuration. The default configuration is i386.
nano Makefile
====
Set the above
=====
Add the following configuration to a file similar
+= -=== $(shell -= /lib/modules/$(KVER)/= /lib/modules/$(KVER)/kernel/drivers/net/wireless/=
After modification, save and exit, you can start compilation and installation.
&&
After installation, the module name is 8192cu. ko. After loading the module, the NIC can be used normally.
8192cu.ko
4. configure a wireless network
Configure static IP addresses for wireless networks first
nano /etc/network/interfaces
Add the following content
#allow-...-roam /etc/wpa_supplicant/
https: -zxvf v1.. cd RTL8188-hostapd-/ &&
vim /etc/default/hostapd
DAEMON_CONF=
vim /etc/hostapd/hostapd.conf
To:
========-=WPA-=====
[ ok ] Stopping advanced IEEE [ ok ] Starting advanced IEEE management: hostapd.
V,
apt-get isc-dhcp- /etc/dhcp/dhcpd.conf /etc/dhcp/ nano /etc/dhcp/dhcpd.conf
default-lease- -lease- -. netmask .. ..-address .-name-servers .,.-lease- -lease-
service isc-dhcp-server restart
VI,
iptables - iptables - iptables -t nat -A POSTROUTING -o eth0 - iptables-save > /etc/ exit
nano /etc/network/-pre-up.d/iptables
#!/bin//sbin/iptables-restore < /etc/iptables.up.rules
/etc/network/-pre-up.d/iptables
nano /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding =
sysctl -p
7. Add auto-start upon startup
Complete the above steps,
apt- chkconfig -- chkconfig --add isc-dhcp-server
Well, all the configurations are complete. This is very suitable for students who use ruijie on campus networks. It is much more interesting than buying a vro. Raspberry Pi is still very powerful. I hope more partners will study it with me.