Server Name Indication (SNI) (Explained by Example)

  Рет қаралды 23,681

Hussein Nasser

Hussein Nasser

Күн бұрын

Пікірлер: 51
@efimovta
@efimovta 3 жыл бұрын
Thanks!
@efimovta
@efimovta 3 жыл бұрын
There are so many cool content on the channel. Unbelievable! My first donate in my life starts with it.
@FarazAliZuberi
@FarazAliZuberi 4 жыл бұрын
Dude you're a legend 😂 hilarious and fun.. keep up the good work.. learnt a lot. Subscribed..
@hnasr
@hnasr 4 жыл бұрын
Thanks Faraz 😊 glad you enjoyed the content and welcome to the community 🙏
@rakeshkala7042
@rakeshkala7042 3 жыл бұрын
seriously man, your videos are damn good. Full of technicalities with fun, btw liked your Arabic accent 🤣
@kumarchitta
@kumarchitta 3 жыл бұрын
Dude, this is awesome 👍 like the way you make it fun and interesting and to the point. Great work my friend.
@luispuentes6392
@luispuentes6392 4 жыл бұрын
This explanation is so nice. Thanks!
@hnasr
@hnasr 4 жыл бұрын
Appreciate it! Thanks
@jackedelic9188
@jackedelic9188 3 жыл бұрын
I never knew about an ip address being able to serve multiple domain names. I just double checked by typing in an existing ip address (instead of its domain name) and got 404. I felt cheated at the end of my 4 year CS education.
@hnasr
@hnasr 3 жыл бұрын
Yup! connecting through IP is not enough for the server as it doesn’t know which domain / website you want.. some Websites might put defaults though
@ritwickdey97
@ritwickdey97 5 жыл бұрын
Hi, how HAProxy knows which cert should to send to the client for "ali", "mark" or "jenny" backend? Does it try to match backend name & cert name?
@hnasr
@hnasr 5 жыл бұрын
Excellent question, during client hello in TLS the client sends the host name it tries to connect. HAProxy takes that host name and match it against each of the three certificate because the certificate has the hostname. And sends the appropriate one that matches. This is called SNI (Server Name Indication)
@ritwickdey97
@ritwickdey97 5 жыл бұрын
@@hnasr Okk. I got it..
@chengdongliao9875
@chengdongliao9875 4 жыл бұрын
Thanks for your effort to make this awosome video!
@hnasr
@hnasr 4 жыл бұрын
Chengdong Liao thanks for your comment dear 😊
@abulaith4485
@abulaith4485 5 жыл бұрын
Wow, great technical video on mutlisite hosting on 1 IP address, even though you confused the hell out of me :-o) LOL
@blypt
@blypt 4 жыл бұрын
Funny Voice of Dad :) :)
@palaniappanrm6277
@palaniappanrm6277 4 жыл бұрын
Hi. Few doubts as always. 1. After you did set up everything and made sure all 3 websites working fine with 1 public ip using SNI, now what will happen if I just specify the public ip address in the browser rather than a domain name? Which content it'll return back? 2. ESNI needs public key to be present in the DNS entry. The public key you mention here is the public key of HAProxy server right? If so, what configuration changes required in .cfg file for the same?
@hnasr
@hnasr 4 жыл бұрын
Palaniappan RM i can see your knowledge is growing with every question you ask! Which is awesome For 1) if you only specify ip address the host SNI will be blank and the SNI handshake will fail on the server.. it is up to the server to serve a default certificate when no host is provided..
@hnasr
@hnasr 4 жыл бұрын
Answer for q2) the public key on the DNS has a matching private key on HAProxy.. So the client will do DNS get public key encrypted the SNI do tls hello .. and server will decrypt the SNI and look at the host..
@palaniappanrm6277
@palaniappanrm6277 4 жыл бұрын
@@hnasr we don't have to do any other configuration in HAProxy config file for this private key decryption during TLS hello to work?
@AhmedAymanElSayed-e1i
@AhmedAymanElSayed-e1i Жыл бұрын
Thanks for the video. Very informative and fun 😉. I had a question regarding ESNI, when the public is key is used to encrypt the TLS handshake. Which private key will the server use for decryption? Like in your example will it be Ali, Jenny, Mark or a default one?
@HarshKapadia
@HarshKapadia 4 жыл бұрын
For ESNI, how is the public key of the target domain encrypted when it is sent to the server?
@hnasr
@hnasr 4 жыл бұрын
The public key is encrypted as part of the DoH connection between the client and the DNS resolver.
@brod515
@brod515 4 жыл бұрын
33:14 I'm confused here. if you make a query to the DNS for a particular domain, then it is already visible. anyone can see you making that request. Edit: 😂spoke too soon I see you address it after.
@brod515
@brod515 4 жыл бұрын
what is the difference between just using NodeJS vs using haproxy (I don't know what haproxy is)?
@AnasLoubadi
@AnasLoubadi Жыл бұрын
think of ha proxy as a load balancer that receive request and forward them to backend servers
@asd848
@asd848 4 жыл бұрын
So this isn't possible without a proxy? You couldn't use SNI, let's say, on a Node server alone?
@hnasr
@hnasr 4 жыл бұрын
Of course if that web server supports SNI, caddy and nginx comes to mind
@MelviHunzaiFamily
@MelviHunzaiFamily 4 жыл бұрын
how i can make a sni account or sign up on sni
@hnasr
@hnasr 4 жыл бұрын
safder karim There is no account for SNI, You can just create multiple domains and use the proxy to configure it as I explained in the video
@abdulsamihamedi5584
@abdulsamihamedi5584 2 жыл бұрын
can i create smart DNS proxy with this method ?
@shikamigreg5490
@shikamigreg5490 4 жыл бұрын
how can i configure this on an android phone?
@hnasr
@hnasr 4 жыл бұрын
this is a pure backend concept, nothing to do in the client except providing the SNI parameter which most SSL libraries do
@shikamigreg5490
@shikamigreg5490 4 жыл бұрын
thanks for the reply, can you make a detailed tutorial on how to correctly configure httpinjector ehi files on android phones to bypass isp for free net?
@chebalid7524
@chebalid7524 4 жыл бұрын
Hey ..nice stuff.. I wanna ask.. Can u instruct haproxy to accept any random sni
@hnasr
@hnasr 4 жыл бұрын
Hmm you can with scripts assuming you have the certificates for each domain requested
@chebalid7524
@chebalid7524 4 жыл бұрын
@@hnasr Ok.. Let say I have my.website.com hosted and running fine with a certificate generated...and in haproxy I set the host name let's say to www.google.com ...and make sure the client hello will have www.google.com in the host header.. Will the tls connection be established???? Hope u understand what I mean..
@hnasr
@hnasr 4 жыл бұрын
The TLS will fail on client because the certificate verification will fail since my.website is not google.com .. The TLS can be successful if client decided to ignore certificate verification example in curl -insecure or in browsers clicking “I understand the risk”
@chebalid7524
@chebalid7524 4 жыл бұрын
@@hnasr Wooow.. Thanks . You just made it clear to me..
@Twowheeleetales
@Twowheeleetales 4 жыл бұрын
How can i capture android app sni
@voidthat
@voidthat 3 жыл бұрын
hey this is a video explaining whats sni is and it is not a video about finding sni -_-
@seeebscraib8465
@seeebscraib8465 3 жыл бұрын
from where hussin
@lukeb0030
@lukeb0030 4 жыл бұрын
at 1.5x speed, this presentation is pretty HekTik
@natesh1
@natesh1 4 жыл бұрын
Hi you forgot to reference the videos in this....
@hnasr
@hnasr 4 жыл бұрын
Natesh M Bhat thanks for letting me know! Do you know where timestamp? It would make it easier for me 😊
@somebody3014
@somebody3014 Жыл бұрын
27:00
@seeebscraib8465
@seeebscraib8465 3 жыл бұрын
انت منيين يا حسيين
@seeebscraib8465
@seeebscraib8465 3 жыл бұрын
يخربييتك مفهمتش حاجة هههههههههه
Horizontal vs Vertical Database Partitioning
10:22
Hussein Nasser
Рет қаралды 38 М.
Where http2 hits its limit
13:13
Hussein Nasser
Рет қаралды 9 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
IO uring gets Zero Copy network operations
15:03
Hussein Nasser
Рет қаралды 13 М.
They made Kafka 80% faster by switching file systems
31:30
Hussein Nasser
Рет қаралды 36 М.
Six stages of a good software engineer
37:12
Hussein Nasser
Рет қаралды 37 М.
Frontend and Backends Timeouts
24:40
Hussein Nasser
Рет қаралды 13 М.
How many kernel system calls do runtimes make?
19:18
Hussein Nasser
Рет қаралды 30 М.
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 38 М.
When do you use threads?
29:36
Hussein Nasser
Рет қаралды 23 М.
SQL IN clauses are miles faster in Postgres 17
22:22
Hussein Nasser
Рет қаралды 14 М.
Fundamentals of Operating Systems
10:39
Hussein Nasser
Рет қаралды 14 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54