-: Captive portal. 2 2
In this lesson, we're going to discuss captive portals 3 3
and some issues you may experience when you're using them. 4 4
First, what is a captive portal? 5 5
Well, a captive portal is a webpage 6 6
that's access from your web browser, 7 7
and it's going to be displayed to newly connected users 8 8
of a wireless network before they're granted broader access 9 9
to network resources. 10 10
Captive portals are commonly going to be used 11 11
to present a landing page or a login page, 12 12
which is going to require authentication, payment 13 13
or acceptance of an end user license agreement 14 14
or something like acceptable use policies, 15 15
survey completion, or some other kind of information 16 16
we're trying to collect from you before we allow you 17 17
to get onto our network and our resources. 18 18
Now, these captive portals are commonly used at places 19 19
like hotels, restaurants, airports, 20 20
and other places that give you free 21 21
or paid wireless networks for you to connect to and use. 22 22
In general, captive portals are implemented 23 23
by using an HTTP redirect, an ICMP redirect, 24 24
or a DNS redirect. 25 25
We're going to talk about all three of those in this lesson. 26 26
Now, when a user attempts to log into a wireless network 27 27
and the captive portal doesn't redirect them properly, 28 28
it can be a really frustrating experience. 29 29
I personally had this happen to me a lot, 30 30
but luckily, I know how to troubleshoot and fix this issue. 31 31
And after this video, you will too. 32 32
Now, for example, I was flying home recently 33 33
on a Delta flight and they use a captive portal system. 34 34
When you connect to the Delta Wi-Fi network on the plane, 35 35
it's supposed to redirect you 36 36
to the captive portals login page 37 37
so you can enter your account information 38 38
so you can access the internet if you're a SkyMiles member. 39 39
Now this didn't work on my MacBook Pro though. 40 40
So I had to start begin troubleshooting this issue 41 41
and figure out what was causing the problem. 42 42
It could have been any of the three redirect methods, 43 43
cause I didn't know which one they were using. 44 44
So let's say first I went and tried to see 45 45
if they used an HTTP redirect. 46 46
With an HTTP redirect, 47 47
all traffic is redirected to a web server that they control. 48 48
And then this web server redirects the clients 49 49
to the captive portal using an HTTP status code of 302. 50 50
In the case of this in-flight Wi-Fi, 51 51
that is not what they were using 52 52
and so I moved on to my troubleshooting efforts. 53 53
Second, I looked to see if they were using ICMP packets 54 54
to redirect me to a captive portal. 55 55
Now, ICMP is a network protocol that's used 56 56
to send error messages and operational information 57 57
indicating the success or failure 58 58
of communicating with another IP address. 59 59
With an ICMP redirect, it's not a very common way 60 60
to do captive portals these days, at least in my experience. 61 61
And again, I found that they were not using that 62 62
inside of the in-flight Wi-FI, 63 63
and so I moved on to step three. 64 64
Step three is probably your most common type. 65 65
And this is what's known as a DNS redirection. 66 66
Now, when the client joins the inflight Wi-Fi 67 67
on board the aircraft, the client gets an IP address, 68 68
a subnet mask, a gateway, 69 69
and a DNS server IP from the network. 70 70
Now this is all handed out to you 71 71
from the onboard DHCP server 72 72
when you connect to the network. 73 73
Now, when the client opens up a web browser 74 74
to connect to a website like deontrain.com or google.com, 75 75
the client is going to be redirected 76 76
to the onboard DNS server 77 77
and then redirected to that captive portal page. 78 78
This is exactly what the in-flight Wi-Fi 79 79
is attempting to use, 80 80
but it wasn't working on my MacBook Pro. 81 81
Now, why is that? 82 82
Well, the issue was, 83 83
my client was already configured to use DNS 84 84
from a static server that I assigned 85 85
and not the onboard Wi-Fi's DNS server. 86 86
Instead, I always use my DNS server as 8.8.8.8, 87 87
which is Google's DNS server because I trust that one. 88 88
So I was configured to use Google's DNS server, 89 89
not the onboard DNS server, 90 90
and therefore it couldn't redirect me 91 91
to their captive portal. 92 92
So I quickly disconnected from Wi-Fi, 93 93
I cleared out my saved DNS setting of 8.8.8.8, 94 94
and I set it automatically be configured over DHCP. 95 95
Then I reconnected to the onboard Wi-Fi. 96 96
Immediately, I was forwarded to the captive portal 97 97
and I was able to get online and surf the web 98 98
at 36,000 feet over the Atlantic Ocean. 99 99
Isn't modern technology just wonderful? 100 100
So, what are some other common captive portal issues 101 101
that you might experience? 102 102
Well, if you're dealing with a smartphone 103 103
like an Apple or an Android device, 104 104
especially with Apple devices, 105 105
sometimes these things don't automatically load up 106 106
the captive page upon connecting to the wireless network. 107 107
If this occurs, you should first open up a web browser 108 108
and try to go to any site like google.com or facebook.com, 109 109
something you know should always be up and available. 110 110
This should cause the captive portals HTTP or DNS redirects 111 111
to take over and then present you 112 112
with a captive portal login page. 113 113
Now, if this doesn't work, 114 114
then you're going to need to check your IP configuration 115 115
of your smartphone and determine what the default gateway is 116 116
for that wireless network you're connected to. 117 117
Then you could type that IP address into your web browser. 118 118
This will force load the cactus portal 119 119
in most cases as well. 120 120
Now, the same thing can happen on your laptops as well. 121 121
And if it does, I tend to follow 122 122
the same three-step troubleshooting process. 123 123
First, I open up a web browser 124 124
and I try to go to any website 125 125
like google.com or facebook.com. 126 126
Second, if that doesn't work, 127 127
I determine what the default gateway 128 128
for the wireless network is, and I enter http:// 129 129
and the IP address for that default gateway. 130 130
Then I hit enter. 131 131
Third, If that doesn't work, 132 132
I verify my DNS server IPs. 133 133
And I make sure that it's not set to something 134 134
like 8.8.8.8 manually and instead I turn on DHCP 135 135
for it to allow me to auto configure my DNS on my laptop 136 136
to connect to their wireless network. 137 137
Then I reattempt step number one 138 138
by opening up a web browser and going to any website again. 139 139
Usually, these three steps will solve 140 140
most of the issues you're going to come across 141 141
with captive portals.