1 00:00:00,630 --> 00:00:01,220 OK. 2 00:00:01,380 --> 00:00:07,710 So in this video, I'm going to teach you how to enable a captive portal login page on your access point. 3 00:00:08,610 --> 00:00:14,640 So first off, I will open the DNS mask config file using nano and the name of the file. 4 00:00:15,180 --> 00:00:19,980 And here on the last line, I have added the IP address for the login page. 5 00:00:20,370 --> 00:00:26,490 Basically, this will redirect any request from the web browser to this IP address when clients connects 6 00:00:26,490 --> 00:00:27,780 to the access point. 7 00:00:28,920 --> 00:00:36,900 So I'll close this and open the host APD config fired using nano and would host a dot com. 8 00:00:37,770 --> 00:00:44,490 And here I will only change the wireless network name to free Wi-Fi and save the fire. 9 00:00:45,570 --> 00:00:54,360 OK, now I would start DNS mask using DNS must see and put the location for the configuration file and 10 00:00:54,360 --> 00:00:59,850 then start host APD by typing host APD and put the configuration file fire. 11 00:01:00,540 --> 00:01:04,920 And I would also add Dash B to run the command in the background. 12 00:01:05,460 --> 00:01:09,020 This is useful if you don't want to open a new terminal. 13 00:01:09,720 --> 00:01:17,780 And no, I need to add the IP address for the double n0 interface by typing ifconfig w and zero and 14 00:01:17,800 --> 00:01:24,530 put one nine two one six eight Dot 1.1, Slash 24 and press enter. 15 00:01:25,110 --> 00:01:31,230 Now the next thing is to set up the login page for the access point, and in my case, I have saved 16 00:01:31,230 --> 00:01:33,330 the files in the home directory. 17 00:01:33,870 --> 00:01:37,500 So to find the fires, I will click on the file manager. 18 00:01:37,530 --> 00:01:43,620 And here I have a folder called Basic Portal, so I open the folder. 19 00:01:44,100 --> 00:01:47,430 And here are the files for the login page. 20 00:01:48,060 --> 00:01:53,310 Now let's see how the page looks like by clicking the index dot each HTML file. 21 00:01:54,120 --> 00:02:00,870 And here you can see a basic HDMI login page, which will be used to appear when clients try to connect 22 00:02:00,870 --> 00:02:04,290 to the access point or key. 23 00:02:04,320 --> 00:02:11,460 Now let's close this, and the next step is to copy the files to the web server directly by going to 24 00:02:11,460 --> 00:02:19,170 other location computer VAR, W W H HTML and page the files here. 25 00:02:19,780 --> 00:02:20,480 All key. 26 00:02:20,530 --> 00:02:27,180 Now, the last thing you need to do is to modify the configuration file for the Apache Web server and 27 00:02:27,180 --> 00:02:28,800 add the rewrite rules. 28 00:02:29,520 --> 00:02:34,050 So already set the rules in a file here in the home directory. 29 00:02:34,050 --> 00:02:40,800 And if I use, as you can see, the Apache Rewrite file, which I will open using nano and the name 30 00:02:40,800 --> 00:02:41,760 of the file. 31 00:02:42,510 --> 00:02:45,810 No, here I'm not going to cover too deep about these rules. 32 00:02:46,230 --> 00:02:53,430 Basically, these rules will make the redirection for a captive portal to work properly, so you need 33 00:02:53,430 --> 00:03:04,170 to copy these and type nine or slash ETSI slash apache2 sites enabled zero zero default dot com and 34 00:03:04,170 --> 00:03:06,810 under virtual host base the code. 35 00:03:06,930 --> 00:03:14,880 And don't forget to save the file was done with that start the web server using service Apache to Two-Star 36 00:03:15,780 --> 00:03:23,490 all key known as to the Windows machine and take the free Wi-Fi network, so I'll click Connect. 37 00:03:24,940 --> 00:03:31,990 And you can see I've been automatically redirected to the login page, so thanks for watching. 38 00:03:32,340 --> 00:03:33,580 And what's your next line?