TP-LINK wr703n brush openwrt and set pppoe networking, install Luci, add new users, Mount USB devices, Configure ftp services, offline download with transmission

Source: Internet
Author: User
Tags tmp folder
Description

This blog is a summary of some openwrt operations last semester. Because only for the TP-LINK wr703n operation, so only for this type of router to make a summary. The summary includes:

Openwrt

Enable WiFi and set pppoe networking

Install Luci and support the Chinese interface

Add new users

Mount a USB device

Install vsftpd as an FTP server

Install transmission for offline download

Router hardware

Flash = 4 mb ram = 32 MB ar9331 chip belongs to ar71xx

Openwrt

Premise: the routing operating system is already openwrt, and openwrt is updated using the command line instead of Luci.

1. download the latest openwrt firmware from the official website (1. The latest firmware can ensure that the installation of various software is normal. 2. The firmware on the official website does not provide the interface Luci). The link is as follows: the firmware download link. After entering the link address, find the firmware corresponding to the TP-LINK wr703n, there will be the following four:


First, there are two different formats: jffs2 and squashfs. The difference between these two formats is that after squashfs is installed, it will occupy a certain amount of space to store some of the necessary files of the system. These files are only readable and are used to help restore the system. When openwrt crashes, it can be based on these files, use the firstboot script to recreate the initial system, while jffs2 does not store such files. The advantage is that it saves space. Generally, we use squashfs firmware to restore the system to its initial state.

Second, each format has two files, factory and sysupgrade. The difference between the two files is that factory has some verification items for upgrading based on the original firmware, if it is already openwrt, use the second file directly. In addition, when upgrading based on the original factory firmware, first use the factory file, then use the sysupgrade file again, and choose not to retain the original configuration for upgrade.

2. Use winscp to copy the sysupgrade firmware to a directory, for example, under/tmp.

3. Run the command MTD-r write/tmp/xxx. Bin firmware.

Supplement:

① It is also very convenient to use the HFS network file server. After using Putty to log on, first download the firmware to the/tmp Folder:

Wget http: // 192.168.175.1: 8080/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin

Refresh the page.

② It is very convenient to use the interface for Refresh, just a brief introduction. Whether it is the factory interface or the openwrt operation interface, first select to go To the firmware upgrade page, then select the corresponding firmware, and upload it for confirmation. Note that if the firmware is from the original factory, you need to first fl the factory. In this case, openwrt is obtained, and then select the sysupgrade file on the interface for upgrade.

After the upgrade, use Telnet to log on and add a password to enable the SSH service (dropbear starts to run). The commands are as follows:

Telnet 192.168.1.1

Passwd Admin

Passwd Admin

You can add the admin password to the root user.

Enable WiFi and set pppoe networking

After the firmware is flushed into the official firmware, it does not contain Luci. Therefore, you must first set up the Internet, and then install Luci and Chinese support online. To set the network connection, modify two files:/etc/config/network and/etc/config/wireless. You can use winscp to directly find the corresponding file for modification. You can also use Putty to log in and use VI to modify the file. You can also directly modify the file in the command line, the basic content of files that support pppoe networking is:

/Etc/config/wireless

config wifi-device 'radio0'option type 'mac80211'option hwmode '11ng'option path 'platform/ar933x_wmac'option htmode 'HT20'list ht_capab 'SHORT-GI-20'list ht_capab 'SHORT-GI-40'list ht_capab 'RX-STBC1'list ht_capab 'DSSS_CCK-40'option disabled '0' #open wirelessoption txpower '17' #set poweroption channel '6' #set channelconfig wifi-ifaceoption device 'radio0'option network 'lan'option mode 'ap'option ssid 'wifi-home' #wifi nameoption encryption 'your encryption' #encrypt wayoption key 'your key' #key

/Etc/config/Network

config interface 'loopback'option ifname 'lo'option proto 'static'option ipaddr '127.0.0.1'option netmask '255.0.0.0'config interface 'lan'option proto 'static'option ipaddr '192.168.1.1'option netmask '255.255.255.0'option type 'bridge'config interface 'wan'option ifname 'eth0' #allocate network cardoption proto 'pppoe'option username 'your username'option password 'your password'

Enter the following commands in sequence:

Set LAN ipuci network. lan. ipaddr = 192.168.1.1 set pppoe to access the Internet UCI set network. wan. ifname = eth0 // assign the nic uci set network. wan. PROTO = pppoeuci set network. wan. username = a03553558228uci set network. wan. password = 508538 set wireless UCI set wireless. @ WiFi-device [0]. disabled = 0uci set wireless. @ WiFi-device [0]. txpower = 17uci set wireless. @ WiFi-device [0]. channel = 6uci set wireless. @ WiFi-iface [0]. mode = apuci set wireless. @ WiFi-iface [0]. SSID = WiFi-homeuci set wireless. @ WiFi-iface [0]. network = lanuci set wireless. @ WiFi-iface [0]. encryption = psk2uci set wireless. @ WiFi-iface [0]. key = wifihomeqp application setting UCI commit restart Network Service/etc/init. d/network restart

Modify the network configuration file, restart the route, or restart the network service to enable pppoe to access the Internet.
Supplement:

Enable wireless connection. After pppoe is enabled, you cannot connect the PC to the router through a network cable to access the route. In my opinion, wr703n only has one network adapter eht0, which is used as a LAN before the network connection and as a wan after the network connection. Therefore, you can only connect to the LAN through wireless connection.

Other networking methods are not described.

Install Luci and support the Chinese interface

After using Putty to log on to the route, run the following command to install the Luci and Chinese packages:

Opkg update // update the software list

Opkg list-installed // view installed software

Opkg install Luci // install Luci

Opkg install luci-i18n-chinese // supports Chinese

You can complete Luci installation.

Run the following command to enable uhttpd that supports Web services and set it to self-start:

/Etc/init. d/uhttpd enable # auto start upon startup

/Etc/init. d/uhttpd start # Start uhttpd

Add new users

By default, openwrt only has the root user. Here we will add another user.

Openwrt provides a series of software for user permission management. For details, see:


After installation, use Linux commands to manage users. Here, you can directly modify the following configuration files:

/Etc/passwd,/etc/passwd-,/etc/shadow,/etc/shadow-,/etc/group.

Add the following content to the/etc/passwd and/etc/passwd files:

Qinpeng: X: 10000: 10000: qinpeng:/home/qinpeng:/bin/ash

Add the following content to the/etc/shadow and/etc/shadow files:

Qinpeng: $1 $ rptwbvd1 $ t6bpblevfnanz3bq43rcu/: 0: 0: 99999: 7 :::

Add the following content to the/etc/group file:

Qinpeng: X: 1000: qinpeng

Correspondingly, replace qinpeng with your username. the login password is the same as root, admin, Which is changed after passwd is installed. As to what these lines mean, there are a lot of online materials. You can BG them by yourself. Then I can write it. In short, after the addition is complete, there will be an additional user: qinpneg, password: Admin. Then, create the directory/home/qinpeng, change the permission to 755, change the owner to qinpeng, and set the group to qinpeng. Then a new user will have it.

Mount a USB device

A series of operations described earlier were based on this step. After attaching a USB device, you can install various software as you like to get rid of hardware restrictions. Write these content next time!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.