Raspberry Pi is a micro computer widely used by programmers and enthusiasts as a basis for device development. At only $ 35 (about $ 140 without taxes) you can use it as a Wi-Fi access point to increase the coverage of your home's Wi-Fi network. To do this, you need to connect the cable card to your router and perform some configuration procedures on the Raspbian Terminal, the most recommended Linux operating system to run on the card.
Huawei and Google launch HiKey 960, rival board of Raspberry Pi
The following tutorial shows you the step-by-step guide for you. The process is a bit long, but if you follow the commands right, everything should work correctly.
Raspberry Pi has no BIOS: learn how to modify basic board settings using config.txt (Photo: Filipe Garrett / TechTudo)
App: Get the best tips and latest news on your phone
In Terminal, start installing dnsmasq and hostapd
Step 1. Open the Raspbian Terminal and at the command line, enter: sudo apt-get install dnsmasq hostapd
Insert the new line at the end of the document. To save, use CTRL + X, then type Y and enter
Step 2. Now we need to edit DHCP. Enter the command: sudo nano /etc/dhcpcd.conf
The Nano text editor will open with dhcpcd.conf file. Go to the end of the document and insert the line: denyinterfaces wlan0
Please check carefully if the document name is correct and the information matches with your network name
Step 3. Now we need a static IP for Pi. Enter sudo nano / etc / network / interfaces and find the wlan0 section.
Edit and leave your file exactly like the image by entering:
iface wlan0 inet static
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Note that IP address addresses and network (gateway) addresses may vary.
The ssid and wpa_passphrase fields can be customized: they are the names of your network and the password via Access Point
Step 4. Now we will edit hostapd settings. Type: sudo nano /etc/hostapd/hostapd.conf
The settings below will create the access point network.
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 = raspberry
wpa_key_mgmt = WPA-PSK
rsn_pairwise = CCMP
Note that the network name is Raspberry-AP and the password is raspberry.
Step 5. Now we need to automate hostapd. Enter: sudo nano / etc / default / hostapd and search for the line ' DAEMON_CONF '. When you find it, change to: DAEMON_CONF = "/ etc / hostapd / hostapd.conf"
Step 6. Now, use sudo nano /etc/dnsmasq.conf and enter:
interface = wlan0
listen-address = 192.168.1.108
server = 22.214.171.124
dhcp-range = 192.168.1.120, 192, 168.1.254, 12h
Step 7. Now we need to configure the IPV4. Use sudo nano /etc/sysctl.conf
In the file, locate the line net.ipv4.ip_forward = 1 and remove the " # " symbol. Save and close the nano.
Enter all commands and stick to system responses. If there is an error message, you entered something wrong
Step 8. Finally, we need to determine rules that allow network sharing. We do this with the following commands:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED, ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
Remember that each line is a different command.
New command saves routine so that Access Point initializes itself every time Rasberry is turned on
Step 9. Now, we need to automate the previous routine so that it loads whenever Raspberry is started. To do this, use:
sudo sh -c "iptables-save" /etc/iptables.ipv4.nat "
Enter the information before the exit line 0. Do not forget to save via CTRL + X and then using Y and Enter
Step 10. Now open sudo nano /etc/rc.local . Just above the exit 0 line, include:
Ready! Just restart Raspberry and you should have an access point made by yourself available
Step 11. Phew! You're all set and your Raspberry Pi running as Access Point should operate normally. Restart to make sure everything is working and start testing your expanded wireless network.
Is Mini Android PC good? Leave a Reply