Cov txheej txheem:

Raspberry Pi Raws Li Tiav Wireless Router: 5 Kauj Ruam
Raspberry Pi Raws Li Tiav Wireless Router: 5 Kauj Ruam

Video: Raspberry Pi Raws Li Tiav Wireless Router: 5 Kauj Ruam

Video: Raspberry Pi Raws Li Tiav Wireless Router: 5 Kauj Ruam
Video: poj laib hauv koj siab. ntxawm tsab 2024, Kaum ib hlis
Anonim
Raspberry Pi Raws li Ua tiav Wireless Router
Raspberry Pi Raws li Ua tiav Wireless Router

Cov lus qhia no yog los tsim lub wireless router los ntawm raspberry pi thiab lub wireless adapter, Tsis muaj ib txoj haujlwm no yog thawj zaug ua ke ua ke tom qab ob peb ua tsis tiav Kuv vam tias qhov no yuav pab tau. Kuv qhov chaw yog:

howtoraspberrypi.com/create-a-wi-fi-hotspo…

github.com/billz/raspap-webgui

github.com/billz/raspap-webgui/issues/141 tus koom nrog Caxton1

Txog qhov haujlwm no kuv tau siv raspberry pi xoom w tab sis ib qho raspberry pi yuav raug siv thiab edimax wifi adapter.

www.amazon.com/gp/product/B003MTTJOY/

Yog tias raspberry pi tsis muaj onboard wifi ob lub adapters yuav tsum muaj peev xwm ua kom haum lawv yuav tsum muaj lub peev xwm nkag tau. Kuv tab tom siv qhov tshiab version ntawm jessie nrog pixel. Kuv tsis paub meej txog lwm cov qauv.

Kuv yuav siv lub adapter raws li kuv kev txuas mus rau sab nraud wifi thiab onboard wifi raws li kuv qhov chaw nkag lossis taw tes lwm yam khoom siv tuaj yeem txuas rau. internetwlan1wlan0device

Kauj Ruam 1: Ua Ntej Ua Ntej Ua Ntej Ntxiv Wifi Txuas

Kev npaj ua ntej txuas ntxiv Wifi Adapter
Kev npaj ua ntej txuas ntxiv Wifi Adapter

Nrog raspberry pi ntawm thiab txuas nrog ntxig lub wifi adapter rau hauv raspberry usb

Txheeb xyuas hauv lub pixel duab uas ob lub wireless txuas tam sim no thiab ib qho txuas nrog lub router sab nraud

Hloov kho pi nrog:

sudo apt-tau hloov tshiab && sudo apt-tau upgrade -y

Tom qab ntawd txav daim ntawv pov thawj wifi mus rau lwm qhov chaw nrog

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf.sav

sudo cp/dev/null /etc/wpa_supplicant/wpa_supplicant.conf

Kauj ruam 2: Nruab Workhorse thiab Web Gui

Tam sim no teeb tsa lub vev xaib gui uas yuav ua haujlwm feem ntau

sudo wget -q https://git.io/voEUQ -O/tmp/raspap && bash/tmp/raspap

Tos kom sai sai tom ntej

Ntaus "y" mus txuas ntxiv

Ntaus "y" rau nruab

Ntaus "y" kom rov pib dua

Koj tus raspberry yuav tsis muaj internet siv rau qib tom ntej

Kauj Ruam 3: Rov qhib Internet Kev Nkag Mus thiab Kho Cov Ntaub Ntawv Kho Kom raug

Rov qhib Internet Kev Nkag Mus thiab Kho Cov Ntaub Ntawv Kho Kom raug
Rov qhib Internet Kev Nkag Mus thiab Kho Cov Ntaub Ntawv Kho Kom raug

Txhawm rau rov qhib kev siv internet peb xav tau muab cov ntaub ntawv pov thawj wifi rov qab tso nrog

sudo cp /etc/wpa_supplicant/wpa_supplicant.conf.sav /etc/wpa_supplicant/wpa_supplicant.conf

Tom qab ntawd rov pib dua

sudo rov pib dua

Thaum rov pib dua hauv pixel desktop txheeb xyuas tias ib qho txuas nrog koj li wifi ssid thiab lwm qhov yog nrog ssid "raspi-webgui"

Qhib lub davhlau ya nyob twg, hloov kho/etc/network/interfaces nrog sudo nano/etc/network/interfaces file hauv kuv rooj plaub kuv yuav rho tawm "wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf" los ntawm ntu wlan0 thiab hauv ntu wlan1 hloov kab "iface wlan1 inet phau ntawv" rau "iface wlan1 inet dhcp"

Kuv cov ntaub ntawv zoo li no

# cuam tshuam (5) cov ntaub ntawv siv los ntawm ifup (8) thiab ifdown (8) # Thov nco ntsoov tias cov ntawv no tau sau los siv nrog dhcpcd # Rau IP zoo li qub, sab laj /etc/dhcpcd.conf thiab 'txiv neej dhcpcd.conf'

# Suav cov ntaub ntawv los ntawm /etc/network/interfaces.d: qhov chaw-npe /etc/network/interfaces.d

auto lo iface lo inet loopback

iface eth0 inet phau ntawv qhia

#wlan0 ua qhov chaw nkag

pub-hotplug wlan0

iface wlan0 inet phau ntawv qhia

#wlan1 txuas nrog wifi sab nraud

pub-hotplug wlan1

iface wlan1 inet dhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Thaum kaw rov pib dua lub raspberry

sudo rov pib dua

Kauj Ruam 4: Tau txais tus Wifis los tham rau ib leeg

Tom qab rov pib dua internet yuav siv tau tam sim no wlan1 thiab wlan0 yuav tsum tau hais kom tham nrog ib leeg, Hauv lub davhlau ya nyob twg:

sudo apt-get install iptables-persistent -yselect yog los cawm txoj cai IPV4 tam sim no

xaiv yog los cawm txoj cai IPV6 tam sim no

sudo nano /etc/hostapd/hostapd.conf

Tawm tswv yim tawm tus neeg tsav tsheb #tus tsav tsheb = nl80211

sudo nano/etc/default/hostapd

Nrhiav kab #DAEMON_CONF = "" thiab hloov nws mus DAEMON_CONF = "/etc/hostapd/hostapd.conf"

sudo nano /etc/init.d/hostapd

Nrhiav kab DAEMON_CONF = thiab hloov nws mus DAEMON_CONF =/etc/hostapd/hostapd.conf

sudo nano /etc/sysctl.conf

tsis suav nrog kab #net.ipv4.ip_forward = 1 kom nws dhau los ua net.ipv4.ip_forward = 1

sudo sh -c "ncha 1>/proc/sys/net/ipv4/ip_forward"

sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE

sudo iptables -A FORWARD -i wlan1 -o wlan0 -m xeev -xeev RELATED, ESTABLISHED -j ACCEPT

sudo iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT

sudo sh -c "iptables -save> /etc/iptables/rules.v4"

sudo rov pib dua

Kauj Ruam 5: Txuas rau thiab Kho Koj Li Wi-Fi Hotspot

Txuas rau thiab Kho Koj Li Wi-Fi Hotspot
Txuas rau thiab Kho Koj Li Wi-Fi Hotspot

Thaum koj raspberry pi rov pib dua, thiab koj yuav tsum pom "raspi-webgui" network hauv cov npe ntawm cov koom tes nkag tau yooj yim.

Thaum lub network pom, txhua yam koj yuav tsum ua yog txuas rau nws, tus lej zais tsis raug yog ChangeMe.

Koj tuaj yeem hloov tus password no, lub npe network, thiab ntau yam ntxiv los ntawm kev txuas mus rau tus thawj tswj hwm ntawm koj lub raspberry hotspot ntawm koj lub vev xaib, los ntawm qhov chaw nyob yuav tsum yog 10.3.141.1.

ID nkag mus: admin

password: zais

Kuv vam tias qhov no yuav pab tau

Pom zoo: