Raspberrypi can toss a lot of methods, I will be my own toss experience to share with you. As a wireless router, we need to provide DHCP function and wireless AP capabilities, we respectively through the Isc-dhcp-server and HOSTAPD the two software to achieve, inter-card forwarding directly through the iptables definition of NAT rules to achieve. Install DHCP service and AP hotspot Service [python] apt-get Install isc-dhcp-server apt-get install HOSTAPD Modify/etc/ network/interfaces Add Modify/etc/hostapd/hostapd.conf in/etc/dhcp/dhcpd.conf Turn on the network card forwarding capability of the kernel and remove the/etc/sysctl.conf [python] net.ipv4.ip_forward=1 comments. Modify iptables NAT rules [python] iptables-t nat-a postrouting-o eth0-j Masquerade Add rules as Auto-start mode [ Python] iptables-save >/root/nat.rule New/etc/network/if-pre-up.d/iptables[python] #!/bin/bash /sbin/iptables-restore </root/nat.rule or write a rule statement directly in the file If your HOSTAPD is not working properly, Should be HOSTAPD not support your network card chip, download: Https://github.com/cnsworder/RTL8188-hostapd/archive/master.zip (2.29M) It is possible to compile directly on Raspberrypi (the compilation speed is really slow) [python] cd HOSTAPD make;make Install re-modify the HOSTAPD configuration file. See the hot   of the tree plum pie;
Raspberry Pi Wireless Router Chapter