Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize PPPOE dial-up access and open wifi hotspots by raspberry pie

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how raspberry pie enables PPPOE dial-up access and opens up wifi hotspots. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The first part connects notebooks and raspberry pies:

1. Download SDFormatter and format the SD card

two。 Download the Win32DiskImager and Raspberry systems, and swipe the Raspberry system into the SD card with Win32DiskImager

3. Open the boot partition of the SD card and create a new file named ssh. Find cmdline.txt and add ip=192.168.0.2 at the end

(note: the new version of Raspberry system default ssh remote login service is turned off, here a new ssh service can be opened. Since raspberry pie is configured only through a direct connection to the network cable, and no monitor is used, an IP will be configured here)

3. Connect one end of a network cable to your notebook and the other to the raspberry pie. Set the computer's IP to 192.168.0.1 (the same network segment as the raspberry pie).

4. Download putty, start the raspberry pie, and then log in to 19168.0.2 with putty ssh on your computer a few minutes later. The default user name is pi and the default password is raspberry.

(if it is MacOS, you can log in to ssh pi@192.168.0.2 directly from the command line)

The second part is raspberry pie connection wifi:

Sudo nano / etc/wpa_supplicant/wpa_supplicant.conf

# add the following words at the end of the file

Network= {

Ssid= "WIFINAME"

Psk= "password"

}

Restart, connect the laptop to the same wifi as the raspberry pie, and connect the dial-up cable directly to the raspberry pie. You may not have much wifi on your hand, but trust me, a laptop can be played with one cable.

The third part configures pppoe and ap hotspots

1. Sudo apt-get install pppoe pppoeconf pppstatus

2. Pppoeconf

3. Sudo apt-get install hostapd udhcpd

4. Sudo nano / etc/udhcpd.conf

Modify network interface

Interface eth0

Change to

Interface wlan0

# before removing remaining

# remaining yes

Change to

Remain yes

Modify the IP address of raspberry pie

Modify opt router to 192.168.10.1

5. Sudo nano / etc/default/udhcpd

Annotate DHCPD_ENABLED= "no" with the # symbol

DHCPD_ENABLED= "no"

Change to

# DHCPD_ENABLED= "no"

6. Sudo ifconfig wlan0 192.168.10.1

7. Sudo nano / etc/network/interfaces

Comment out wifi related

Increase

Iface wlan0 inet static

Address 192.168.10.1

Netmask 255.255.255.0

Up iptables-restore

< /etc/iptables.ipv4.nat 8. sudo nano /etc/hostapd/hostapd.conf 在该文件中增加以下内容 interface=wlan0 driver=nl80211 ssid=Raspberry_AP hw_mode=g channel=6 macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP 9. sudo nano /etc/default/hostapd 改 #DAEMON_CONF="" 为 DAEMON_CONF="/etc/hostapd/hostapd.conf" 10. sudo sh -c "echo 1 >

/ proc/sys/net/ipv4/ip_forward "

Modify / etc/sysctl.conf file

11. Sudo nano / etc/sysctl.conf

Add to the last line of the file

Net.ipv4.ip_forward=1

twelve。 Enter the following instructions in turn

Sudo iptables-t nat-A POSTROUTING-o ppp0-j MASQUERADE

Sudo iptables-A FORWARD-I ppp0-o wlan0-m state-- state RELATED,ESTABLISHED-j ACCEPT

Sudo iptables-A FORWARD-I wlan0-o ppp0-j ACCEPT

Sudo sh-c "iptables-save > / etc/iptables.ipv4.nat"

Thank you for reading! This is the end of the article on "Raspberry pie how to achieve PPPOE dial-up access and open wifi hotspots". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report