Public IP vs. Private IP and Port Forwarding (Explained by Example)

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 320

  • @keithscull8288
    @keithscull8288 2 роки тому +23

    This is what we need! Most sources explain concepts like this with a Networking context and so as developers not only does it not click, but we have no idea what relevance it has to the applications we develop. You explain conceptually and even make a point to show an example with a real world app while omitting "unnecessary" networking terms. And if we wanted to expand to lower level networking aspects we have a better chance with that now as well ..

  • @philomath6190
    @philomath6190 3 роки тому +89

    You explained it better than my college instructor.

  • @szilardfineascovasa6144
    @szilardfineascovasa6144 2 роки тому +6

    This channel is a treasure trove.
    Finally getting to understand misc. stuff I just heard thrown around by network or sys-admins.
    Thanks, Hussein. And the humor makes everything even better!

  • @andresbonelli
    @andresbonelli 2 роки тому +3

    By far the most pristine explanation on this topic. And at last someone with enough balls to show the public IP on a tutorial because when you blur things out on a tutorial it gets confusing, for someone who still doesnt fully understand the topic!!

  • @sukiyang3474
    @sukiyang3474 3 роки тому +4

    It's like you have the magic powering of explaining things in the most understandable way.

  • @kallolchakrabarti8210
    @kallolchakrabarti8210 3 роки тому

    I dont have any knowledge. Surprisingly, I understood the lecture. You are a genius bro. God bless.

  • @GoliYardan
    @GoliYardan Місяць тому

    Your teaching clip was the best of any video I have ever seen and full understandable and simple, thanks 👍

  • @namahshrestha3226
    @namahshrestha3226 5 років тому +45

    This guy needs to have more subs. Totally worth the watch.

  • @brianjosephblake
    @brianjosephblake 3 роки тому +9

    This is EXCELLENT content and very well explained. Thank you, Hussein!

  • @AsrarSheikh_IN
    @AsrarSheikh_IN 4 роки тому +3

    One of the greatest explanation video on UA-cam 👍👍👍

  • @bobbymannino
    @bobbymannino 5 місяців тому

    Absolute perfection of a video - teacher material ❤

  • @SuperFakeMinecraftChannel
    @SuperFakeMinecraftChannel 4 роки тому +15

    I didn't really search for this, but thanks for the guide, now I learned something new. This was really helpful and understandable!

    • @hnasr
      @hnasr  4 роки тому

      Thank you Willox! I am happy the video is informing

  • @gouravkhator
    @gouravkhator 3 роки тому +1

    After so many years, I have got the full idea of default gateway and public ip

  • @rshaikh05
    @rshaikh05 3 роки тому +1

    excellent. crystal clear now. jazakAllahu khair Hussein.

  • @ryarod
    @ryarod 4 роки тому

    There is an online multiplayer game that is now in the hands of the fans to resurrect. In order to do that I need to be able to hold public ip addresses and port my routers.
    This video marks the first I've seen in my quest to roll up my sleeves, get to work, and bring Primal Carnage back! I look forward to learning the content this video's title alludes to, among much else.

  • @praveenreddy5211
    @praveenreddy5211 2 роки тому

    Thank you wonderful session with example. its very helpful for host my website through public

  • @alih.3128
    @alih.3128 2 роки тому

    Thanks champ 😘
    الله يوفقك اخ حسين، فخورين فيك

  • @sayan883
    @sayan883 4 роки тому +2

    Great Content Hussein.Pease continue the good work.!!

  • @norah5073
    @norah5073 3 роки тому +1

    I love your way of how you explain the point.
    Thank you so much for your efforts and time

  • @sazon8009
    @sazon8009 3 роки тому +3

    a thank is not enough bro, i love the way you teach it so easy to understand, it you make it easy to understand

  • @atibyte
    @atibyte 4 роки тому +1

    The best explanation on port forwarding, thank you.

  • @programmingwithshahriar9939

    Beautifully explained! Keep up the amazing work..

  • @coluccicreations5845
    @coluccicreations5845 2 роки тому

    Your explanation was excellent I understand now THANK YOU !!!

  • @stevelamparas
    @stevelamparas 3 роки тому

    Well explained in just 9 40 minutes. Good job

  • @humayunnaveedkhan1281
    @humayunnaveedkhan1281 3 роки тому

    Thank you so much my brother Hussein.. Best explanation

  • @harshitgangwar4500
    @harshitgangwar4500 3 роки тому

    Awesome video man. I am so grateful I found your channel.

  • @elements88xyz
    @elements88xyz 2 роки тому

    simple and well said for everyone to understand !!! thank you Hussein :D :)

  • @vuhaiang2077
    @vuhaiang2077 3 роки тому +1

    love your videos so much, big fan from Viet Nam

    • @hnasr
      @hnasr  3 роки тому +3

      Glad you enjoy the content and all love to my subs from Vietnam 🇻🇳

  • @btmillion2813
    @btmillion2813 4 місяці тому

    Also at 7:59 I think you only specified the ports that the router is meant to forward to HusseinMac, but not the port that it would go to on HusseinMac. Since you used 8080, is it meant to be assumed that it's at 8080 on HusseinMac too?

  • @Alex-ir5ph
    @Alex-ir5ph 2 роки тому +1

    Awesome explaining, thank u!

  • @mazighus
    @mazighus Рік тому

    Clear and easy thank's Bro i give you a big like 👌

  • @giiovaani
    @giiovaani 3 роки тому

    Here we have a REAL teacher !!!

  • @ThangPhan-q3u
    @ThangPhan-q3u Рік тому

    Thank you so much, the way your sharing very funny and easy to follow, keep it up :)

  • @hamzanasir1590
    @hamzanasir1590 4 роки тому +1

    You are great SIR. Keep making videos on software engineering 👍👍👍

  • @IamBrocco
    @IamBrocco 2 роки тому

    i love your way of speaking, it makes me proud of being an arab!!! keep your good content up!

  • @MrStranG-MrStranG
    @MrStranG-MrStranG 3 роки тому

    Tq so much... It really helps me... Thanks Again

  • @Thugga_Thugga
    @Thugga_Thugga 3 роки тому

    Thank you so much man! Keep doing excellent.

  • @antoninperonnet6138
    @antoninperonnet6138 3 роки тому +3

    I think there was only one concept missing: the loopback interface of the router.
    On some routers when you request the router's public ip it will not respond: you need a loopback.

  • @jeffersonc5994
    @jeffersonc5994 3 місяці тому

    Great video! This is very related to my problem where my ISP only provides dynamic IP, which is why I cannot use PS5 Remote Play through my phone, when my mobile device uses mobile data or connected to a different wifi network. Please guide me through. I can access my routers admin.

  • @timmytim9054
    @timmytim9054 5 років тому +3

    Your personality is amazing.

    • @hnasr
      @hnasr  5 років тому +1

      Timmy Tim thank you so much for the compliment! Hope you enjoyed the video :)

  • @kamaleshpramanik7645
    @kamaleshpramanik7645 3 роки тому

    This is awesome ... Thank you very much Sir.

  • @mohammadahmedragab837
    @mohammadahmedragab837 2 місяці тому

    amazing simple explanation

  • @bryanssj3949
    @bryanssj3949 4 роки тому

    Great!! Finally I can play Need for Speed 3 Hot pursuit whit my friends :D greetings from Chile

  • @no_one3249
    @no_one3249 3 роки тому

    Thank you so much for the explanation~!

  • @adhishmalviya426
    @adhishmalviya426 3 роки тому

    Are mere ladke jaan he tu meri 🔥

  • @minhthinhhuynhle9103
    @minhthinhhuynhle9103 2 роки тому

    I enjoyed this video. I enjoyed your voice. I give you a thumb up - like :)) (y)

  • @sravanikatasani.630
    @sravanikatasani.630 3 роки тому

    Thank you for this amazing content!!

  • @Bloome_BlueFolf
    @Bloome_BlueFolf 2 роки тому

    Simple and clear. Well made.

  • @JuanchoPM
    @JuanchoPM 3 роки тому

    Such a master... Subbed and liked

  • @aryanbhosale9254
    @aryanbhosale9254 3 роки тому

    Thanks very useful for Arduino projects that need websockets

  • @upsolvecontest4677
    @upsolvecontest4677 2 роки тому +1

    can i do this thing with my mobile hotspot ??

  • @theSeniorSDE
    @theSeniorSDE 2 роки тому

    Very well explained sir.

  • @rickhorvath
    @rickhorvath Рік тому

    How might I do this without adding the port 8080? Ultimately using a domain name which points to my public IP and then to the web server I have on my LAN? Thanks in advance.

  • @Player-ub9tg
    @Player-ub9tg 4 роки тому +1

    This is the video I've been searching for. Form me, this video is more expensive than gold

  • @indietuts
    @indietuts 2 роки тому

    Wow, This what I was looking for?

  • @rudykammermeier8227
    @rudykammermeier8227 2 роки тому

    Excellent explanation!

  • @gigachadkartik
    @gigachadkartik 2 роки тому

    Awesome explanation.

  • @ignaciotorocoronado985
    @ignaciotorocoronado985 3 роки тому

    Hussein. Here goes a few courses on college and im not even joking.

  • @lanncerigs262
    @lanncerigs262 3 роки тому +1

    Thank you for the video! It helps me as an aspiring backend engineer :)
    Anyway, I have a question. Sorry if it is a dumb question but, why can't you access the application using the public IP even if you are connected to the WiFi? I really appreciate if anyone can answer this question.

    • @oscarozorio1005
      @oscarozorio1005 2 роки тому

      That's because that IP it's from the router so it doesn't have the app lets say, the app is running on the machine with the private IP and we stuck at the router who doesn't know where's the app

  • @sukhpreetlotey1172
    @sukhpreetlotey1172 3 роки тому

    Thanks for clearly explaining it.

  • @user-rg1jp2us4o
    @user-rg1jp2us4o 4 роки тому

    Thank you so much for this simple explanation. Its down to earth and makes sense. You have earned my sub.

  • @youneskechache1804
    @youneskechache1804 2 роки тому

    Thanks for the explanation simple and easy to understand, i would to ask a couple of questions if anyone could help me.
    Can i use 2 routers for the same home network (same service provider same bill) ?
    If yes does that mean the 2 different routers have 2 ip adresses or will it be just 1 ip adress on the 2 routers (the one provided by the network company)?

    • @oscarozorio1005
      @oscarozorio1005 2 роки тому

      I guess it'll be only 1 public IP but 2 different IP's for the default gateway IP address

  • @andylib
    @andylib 5 років тому +2

    This is tutorial is gold! Thanks

  • @f.i4215
    @f.i4215 4 роки тому +2

    Ive done this and checked port foward checker, it says its closed and it shows me my ;public IP again! any help?

  • @abidsaleem7526
    @abidsaleem7526 4 роки тому +1

    Great video. Thanks :)

  • @mjh3426
    @mjh3426 5 років тому +3

    brother, i've an issue. my router wan ip is 10.x.x.x series. how can i make port forwarding with this? is it possible to do?

    • @hnasr
      @hnasr  5 років тому

      Of course you can , this is a feature in the router. The ip range has nothing to do. Check your router admin page their should be a port forward option under firewall ... if not you can always do reverse tunneling check the video we made here ua-cam.com/video/iR4jLbG9KXw/v-deo.html

    • @lyingcat9022
      @lyingcat9022 5 років тому

      10.0.0.0 - 10.255.255.255 are not public IPs. This range is private and is the range your router uses to assigns IPs to devices on your local network. Your public WAN IP will be some other address.

  • @aleaguiarl
    @aleaguiarl 3 роки тому

    Fantastic explanation

  • @godofkings4366
    @godofkings4366 3 роки тому

    thank you verry much . so i want to make sure . so we need open port and public ip address for entering private lan . is it correct .

  • @nathanbenton2051
    @nathanbenton2051 4 роки тому

    I have a VM (running via VirtualBox on my local) configured with a bridge network on my local machine. On my host machine (or local environment), I secured copied (via terminal command scp) a file to the VM via 192.168.1.#. did that event ever go to the router or did all the networking on that particular request remain entirely within my local machine?

    • @hnasr
      @hnasr  4 роки тому +1

      Fantastic question and beyond my knowledge to be honest. But I will make a guess. If you bridged your VM that means it is now part of the same network your physical machine is on, that also means it is going to get a unique IP address usually from the router DHCP and a unique mac address. So my answer is yes that command does go through your router and your physical machine will answer the ARP request for both the VM and itself
      Hope that helps but keep those challenging questions coming!

  • @vvnnable
    @vvnnable 3 роки тому

    you are a life saver bro

  • @kazrie5795
    @kazrie5795 3 роки тому

    hello mate..how to port forwarding for games on steam..i’m trying so many times doing setup to run dedicated server..but it’s won’t work..maybe i’m doing wrong…i don’t understand about wan/router..where should i put the number for port 27015(steam game)..

  • @jayanthbondi4251
    @jayanthbondi4251 3 роки тому

    Excellent video !!

  • @1217castor
    @1217castor Рік тому

    Exactly what I am looking for

  • @fellafellouch5594
    @fellafellouch5594 4 роки тому +2

    Thank you for explaining. I dont have the port forwarding in my router (soooo bad) Can i do port forwarding with IPTABLES or what ever else?

    • @hnasr
      @hnasr  4 роки тому

      Thanks! And yes you can use iptables check the video I made here ua-cam.com/video/uuWzk8U4dJE/v-deo.html

  • @Airborn14
    @Airborn14 2 роки тому

    How do I change my IP address from private to public? I have the Netgear 4G LTE modem LM1200, so I can run a node online using my raspberry Pi 3 B+ running through a Deeper network Mini device

  • @hemsagarpatel8992
    @hemsagarpatel8992 4 роки тому +1

    Hi Sir i have tomcat running at 8080 on a windows pc ,,, i did port forwarding for this windowsPCIP and 8080 port ,and its not working from 4g net of my phone ,,,,what i need to do extra,,,,thanks

  • @mebachanews3450
    @mebachanews3450 3 роки тому

    Life saver! Thank you sir!

  • @waves-coder
    @waves-coder 3 роки тому

    hey, Hussain does the real server in mnc uses port forwarding or any other technique can u plz...............................................................................................................................................
    explain the real industries model
    big Fan of U

  • @mrjohnbull
    @mrjohnbull 4 роки тому

    good day sir, i want to first commend you for the justice you did to the video on port forwarding. neatly explained. thank you very much sir. may God almighty whom i server bless and give you more grace, knowledge and greater wisdom. i was really educated by the simplicity of your teaching. please sir, i need a favour from you, what is the name of the router you used for the above video and how can i get it, i live in Nigeria. once more thanks sir.

  • @Parth.Deshpande
    @Parth.Deshpande 2 роки тому

    amazing explanation

  • @pantherwolfbioz13
    @pantherwolfbioz13 4 роки тому

    But what if there are 2 applications running on port 8080? How to port forward that time? Will the router fail?

  • @alirezai1434
    @alirezai1434 4 роки тому +1

    mashallah brother nice job

  • @ianchong7422
    @ianchong7422 3 роки тому

    so simple and thanks for sharing.

  • @shijuvarkeythomas406
    @shijuvarkeythomas406 4 роки тому +1

    how we can make two different location computer IP in local IP range ?

  • @mr.ickster516
    @mr.ickster516 4 роки тому +1

    Hey Hussein! I tried port forwarding but basically when I use an online utility to check if my port is open, it says its closed. I really understood the concept behind it, but I just cant get my port to open. Is this because my service provider is blocking the ports from exposure on their end?

    • @hnasr
      @hnasr  4 роки тому

      It could be you have a firewall somewhere in your networking stack that is blocking that particular port. Can you check that in your router

    • @mr.ickster516
      @mr.ickster516 4 роки тому

      @@hnasr I tried disabling my firewall and testing again, but to no avail. In the end I tried portmap.io and that seems to work, but I cant seem to get it done the clean way you did it!

    • @leruty
      @leruty 4 роки тому

      God, it´s the same shit I´m having now. I´ve got my new router 2 days ago and finally I can open ports. In the THEORY only unfortunately :( I´ve opened the port for Need for Speed 3, Need for Speed High Stakes and 3 Call of Duty games (MW2, MW3 and BO2) and only MW3 and BO2 are REALLY open meanwhile MW2 NAT is still "Strict" and hosting without Hamachi and Radmin VPN NFS3 and NFS4 people can´t connect to my lobby.

    • @mr.ickster516
      @mr.ickster516 4 роки тому

      Steffen Hohler i still havent got it to work so I just resorted to using hamachi. It greatly limits the number of players I can get into my game though :/

    • @leruty
      @leruty 4 роки тому

      @@mr.ickster516 There´s a better similar program called "Radmin VPN" you can have about 80 people or so in it

  • @jongjong9455
    @jongjong9455 4 роки тому

    Can you make a demonstration about trueconf using this concept. Connecting client to the server using internet.. Thanks.

  • @8ack2Lobby
    @8ack2Lobby 3 роки тому

    I have a CGNAT so I can't open ports with my router :( any workaround

  • @thegame8538
    @thegame8538 3 роки тому

    I am trying to find a place to buy SSH Tunnel no-login servers. Have any ideas?

  • @anuranjaniit
    @anuranjaniit 3 роки тому

    Fantastic video! I have a query: How do I achieve port forwarding if two devices in the LAN are hosting applications on the same port? Is this even possible? Or will I get 'port already in use' error?

  • @AdrienAranda
    @AdrienAranda 2 роки тому

    Hello! I did all the steps and my friend can connect to my private port so it works, but I tried to test it on my own with my very same computer like you did and it's not working. It says connection refused. Why is that?

  • @phantomswordorpoo
    @phantomswordorpoo 4 роки тому +1

    I tried it, allowed my port through windows firewall , set up port forwarding through router but still its not working

  • @ferasawwad71
    @ferasawwad71 4 роки тому

    Sir, I do not mean that, I mean are there other ways to communicate with any site, do you use the API or Google code .. Do you have an explanation of how to use the code for communications

  • @KidsShowtimeOfficial
    @KidsShowtimeOfficial 3 роки тому

    How to make the public IP address as static? Is that possible to have fix public IP address?

  • @winnerslanetown5158
    @winnerslanetown5158 5 років тому +3

    Hi, thanks for your explanation. If anyone knows the answer to the question I’m about to ask, I will appreciate you replying with it please.
    How does the router know the destination internal IP address?
    What is the significance and use of the internal IP address when the mac address is also being used?

    • @hnasr
      @hnasr  5 років тому +3

      Winnerslane Town good Q! This is done through what is called NAT or network address translation where a public ip of the router along with a port is mapped to an internal ip address with a port. The router keep track of each TCP connection and map it all day. I suggest you watch my OSI model video I talk a little bit about the layers and how data is sent.. let me share it here hope that helps

    • @hnasr
      @hnasr  5 років тому +2

      Winnerslane Town oh forgot to answer the second question (also good question ) we use mac address to get the frames to a machine, we use the internal ip address and port to get the (frames) and packet to a network interface and to a specific application .. and we use IP addresses instead of mac because all applications deal with IP addresses and ports so im guessing consistency .. hope that helps!

    • @hnasr
      @hnasr  5 років тому +2

      Winnerslane Town and as promised here is the osi model video ua-cam.com/video/7IS7gigunyI/v-deo.html

    • @hnasr
      @hnasr  5 років тому +2

      Made a video about NAT explaining this ua-cam.com/video/RG97rvw1eUo/v-deo.html

    • @mrjohnbull
      @mrjohnbull 4 роки тому

      @@hnasr please sir share it. i need to see it. just got to know about you today

  • @vaithiya17
    @vaithiya17 3 роки тому

    Hi ☺️
    Just a query,
    How does the firewall/router handle multiple ping requests, since ICMP doesn't have a port? Ex. 2 PC pinging to 8.8.8.8, how will FW/Rtr handle these two pings.

    • @hnasr
      @hnasr  3 роки тому +1

      Great question, ICMP is a layer 3 protocol so it doesn’t have a port just source destination ip, as a result you can’t NAT it if two machines behind NAT pinged the same server. For that NAT use a unique id in ICMP packet to store the mapping
      tools.ietf.org/html/rfc5508

    • @vaithiya17
      @vaithiya17 3 роки тому

      Thank so much Guru 🙏☺️

  • @biohazard5702
    @biohazard5702 5 років тому +2

    dude man you need to become a real teacher or something like that i understood everything in one sigle video and i had soo many issues understanding this. thank you

    • @hnasr
      @hnasr  5 років тому +1

      BIOHAZARD thank you so much for your comment! Happy I could help thats why I make videos 😊

  • @tonytrilex2555
    @tonytrilex2555 3 роки тому

    So websites can only see your computer IP address and router Ip? Can they also see your Mac addresses and if so can they see the Mac address of your Computer, Router and Modem?

    • @hnasr
      @hnasr  3 роки тому

      No they can’t. They can only see the public IP address of your router now even your private ip

  • @emilioortega9487
    @emilioortega9487 4 роки тому

    Why it doens't let you choose the port from the computer ? I mean you select the port of the router 8080 but it doesn't let you insert the port of the computer HusseinMac , solo how does the router what port to use ? or is it using the same port that was requested to the router ?

    • @hnasr
      @hnasr  4 роки тому

      Emilio Ortega I can actually that is what the local base port section is for ..

    • @emilioortega9487
      @emilioortega9487 4 роки тому

      Hussein Nasser so if that section is for the private port where can you set the public port ? 🤔 bc in my configurations I need to put two ports the public and the private one

  • @programmingjoint3034
    @programmingjoint3034 4 роки тому +2

    you are the best

  • @usernamewatcher
    @usernamewatcher 4 роки тому

    Well done! Useful! Thanks! ))