The environment of ATC tools is divided into 2 main parts: WiFi hotspot Sharing and ATC Environment building Environment
System: OS X 10.10.3
Vm:virtualbox
Linux:ubuntu 14.04 WiFi hotspot setup
Reference article:
Use HOSTAPD and dhcp3-server to build Wi-Fi APs on Ubuntu12.04
Create a wireless (WiFi) Hotspot USB Wireless card selection on VirtualBox ubuntu
Mercury mw150u 150M Wireless USB card: Follow the IEEE 802.11b/g/n standard, free drive, directly available. I just started using the 360wifi, need to build my own driver, I gave up. The temperature recommended this, it took 30 dollars to buy a. With wireless WiFi, you can do the following activities, with the LSUSB command can see our USB Wireless Card information:
F201:5370 is our wireless card information, indicating that we recognize our USB wireless card. installing HOSTAPD and DHCPD
Udo Apt-get Install HOSTAPD Isc-dhcp-server
To see if the installation was successful:
See the information above to indicate that both tools have been installed successfully. hostapd.conf Create
To create the hostapd.conf file anywhere, I created the file in the/ETC/HOSTAPD directory with the following file contents:
Where the SSID and wpa_passphrase for the WiFi username and password, arbitrarily set, the other configuration is 32 the same. After configuring the information, let's verify if it works, execute sudo hostapd-b/etc/hostapd/hostapd.conf
I use the-b parameter to let HOSTAPD run in the background. You can also start with the-D parameter. WLAN Soft Blocked issues
If you start the error message is as follows:
Since I have already activated the WiFi, I need to unlock the wireless device before executing the command with sudo.
sudo rfkill unblock WLAN
sudo hostapd-b/etc/hostapd/hostapd.conf
Restart again
If you have already used sudo hostapd-b/etc/hostapd/hostapd.conf, the following error may be reported when executing:
We'll need to execute the sudo killall HOSTAPD before we execute the hostapd-b command.
OK, we have started the HOSTAPD. Settings for dhcpd.conf
Add the following information to the last line in the/etc/dhcp/dhcpd.conf file:
Subnet 192.168.0.0 netmask 255.255.255.0
{
range 192.168.0.2 192.168.0.10;
option routers 192.168.0.1;
Option Domain-name-servers 8.8.8.8;
}
I use NMCLI dev list iface eth0 | The grep IP4 command gets my DNS information for 192.168.1.1, so the information for my dhcpd.conf file is as follows:
set up a wireless card
Ifconfig command before setting
You can see only eth0 and lo two network device information. Set Wlan0
sudo ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 after setting
You can see one more Wlan0 wireless device. Success. Start Dhcp-server
sudo dhcpd wlan0-pf/var/run/dhcp-server/dhcpd.pid
If the following issues occur:
Description Dhcpd.pid file does not exist, we go to the/var/run/dhcp-server directory to create a dhcpd.pid the file, and then execute the Dhcp-server service can be started.
IP Forwarding
sudo bash-c "Echo 1 >/proc/sys/net/ipv4/ip_forward" set NAT
sudo iptables-t nat-a postrouting-o eth0-j Masquerade connection autotest WiFi
Now that we have all the WiFi hotspot settings complete, turn on your phone and see if you have wifi. If not, don't worry, do it again with sudo hostapd-b/etc/hostapd/hostapd.conf.
configuration of ATC tools
Reference articles
GitHub
Use of the Web Environment Simulation tool ATC in Facebook
ATC tool configuration is a lot easier than WiFi hotspot sharing, just follow GitHub. Start ATC
sudo atcd--atcd-wan eth0--atcd-lan wlan0
start the ATC profile configuration Interface
Python manage.py runserver 0.0.0.0:8000
link ATC profile Configuration Interface
I've added a few profiles of Facebook presets, and now I'm ready to switch. Ha ha. One word: acid cool. How to switch
When you choose the Select button behind the profile (below), an update shaping button will appear next to the switch button on the program, and your network will become the network environment set by the profile you choose.
Of course don't forget to open the turn on button.