How to Access your Raspberry Pi Website over the Internet (with port forwarding)
HTML-код
- Опубликовано: 18 май 2021
- Learn how to port forward so you can access your Raspberry Pi from anywhere in the world over the internet.
Find more at tonyteaches.tech
Check out my vlog channel @TonyFlorida
#raspberrypi #portforwarding Хобби
FINALLY!!! I was waiting for one of these videos made specifically from you! I was struggling getting my website online! 👏👏
I'm so glad!
A lot of routers will let you specify an EXTERNAL port to forward to an internal port number, so you can forward external requests from, say port 8080, to internal port 80. Alternatively you could change the port of your internal website to a different port number (8080 is a common alternative for websites if port 80 is blocked or in use).
It depends on what kind of blocks your ISP is using, if they are using "Deep Packet Inspection" then this checks what kind of traffic is flowing in and out, no matter what port has been specified - this might be why you had the problem, Cox might be using this kind of scanning on your connection, there's not an easy way around this, I'm afraid.
Spot on John! Thanks for taking the time to write this up.
Thanks, Tony i learn new and cool things from your videos, keep it up 👍
You're welcome Ravi. Always appreciate you watching :)
This was a super helpful video! I never considered my ISP was blocking certain ports, thank you. ALso, love the Maryland gear.
Glad it was helpful!
This is a great video, even if you didnt get to complete it. That has me getting prepared. Actually reminded me of something i read in the past about this... i think my provider has a package that does allow port forwarding
I have a samba share set up on my LAN, would it be possible to access my shared folder outside of my Network?
Thank for all the help
Sure thing :)
now i cant even connect to wp-admin after changing ip how to fix it in the web files plz help
Thank you a lot, Tony!
Worked for me! Thankyou!!
Is there a way to use the pi with a domain?
How would this work with dual stack? Most of us don't even have a public ipv4 anymore
HI Tony, thanks for the great video. Unfortunately as soon as I change my WP config to use the external IP, I cannot reach the dashboard anymore (from both internal AND external connections). This means I can't go back on the settings and need to reinstall WP on the Pi altogether
nah u could edit the mariadb and then change the values for the settings there
Tony is a legend 🥰
You can use cloudflare tunneling right?
If you think about it it's a good thing that you get port 80 and 443 blocked by default. Home routers are not meant or secure enough to host public services to the Internet, given there are so many bad actors out there. So they instead force you to use a different non-standard port to at least protect you from most bots scanning your device and exploiting vulnerabilities in the common ports.
As another comment said below, you should just use a different free port, 8080 instead of 80, or 8443 instead of 443. That's quite the standard, but if you're hosting for yourself you might as well use the port you want. If you need an easier access without IP and port, you have to consider a DDNS service because your IP will probably change.
I agree with you David
Can I forward port 443 only? I have installed ssl already
Tony,
I followed your last tutorial for wordpress on a rpi and I followed this one too. Now, how can I use the domain name I bought so that the wordpress site is navigable from the domain name? Thanmks for the help!
You can simply set up a DNS A record ruclips.net/video/QcNBLSSn8Vg/видео.html
Hey Tony, when you mention we can watch another video if we don't understand how you get to this point, could you kindly link the video you are referring? Btw, great channel.
This video will show you how to setup WordPress on a Raspberry Pi ruclips.net/video/8psimaAr1U8/видео.html. Is that what you're asking for?
how i can setup if im using apache webserver and my php/html pages are on the pi....im not using wordpress. just created simple and put that in /var/www/html on pi
Solid video and very informational!
Have you found a reliable work around for this ending?
I’ve got Cox too and need to connect my pi via EC2 for a short demo presentation. If not, any leads on topics to research?
Perhaps try a different port than 22 that Cox doesn't block. Just make sure you change the /etc/ssh/sshd_config files to listen on this new port
@@TonyTeachesTech Thanks Tony! 🙏🏼
Can I assign public ip in raspberry pi?
Hi, Tony! I have a really quick question. My ISP uses a setup with a separate modem and router. The router that the ISP supplied didn’t have a port forwarding option I could find, so I simply kept the ISP modem and used a better quality router I had kicking around the house (Netgear R6300 v1) which has port forwarding. So I have successfully setup port forwarding to my pi on my R6300, BUT… every time I get to the point where I paste my external IPv4 IP into my Wordpress site and save changes, the site reloads and I can no longer access the Wordpress site my admin dashboard. I have even reinstalled Wordpress and changed the “listen on” port to 8080 in the “Wordpress.config” and changed the port forwarding to 8080 in the router settings, in case my ISP blocks web traffic on port 80, but no luck. I haven’t been able to find any info online regarding my ISP and what ports they block.
Any suggestion on how I can rectify this issue would be greatly appreciated. I am very eager to get my Wordpress site up and going and accessible from outside my LAN.
Thanks in advance!
-Milo
you will have better luck asking in a related subreddit
@@Kyle_v2 Thanks 🙏 for the response. I have done quite a bit of research online regarding this topic without much luck. (Including some Reddit forums) Do you have any specific threads you would recommend reading that might be insightful? Thanks in advance!
-Milo
Is this method bad over network security ?
Would this work to for running Minecraft servers?
Is opening port 80 or 8080 externally dangerous? I have a RPI4 and just want a Wordpress/html page to be available with some pictures on it. Is it insecure to open that port?
Only if you do it improperly. For instance, let us say I have a server in my house for a website. Externally, I decide to open port 6394 for no specific reason. My router will forward any traffic incoming that port to the specified, internal, IP address on port 80 (HTTP) or 443 for (HTTPS). My server (raspberry pi or otherwise) will handle the traffic. If I mishandle the traffic then I may be able to be exploited. To better illustrate, my service that is handling the traffic and giving out my website is an Apache HTTP Server 2.4.17; the reason I chose this version is because there was an exploit:
In Apache HTTP Server 2.4 releases 2.4.17 to 2.4.38, with MPM event, worker or prefork, code executing in less-privileged child processes or threads (including scripts executed by an in-process scripting interpreter) could execute arbitrary code with the privileges of the parent process (usually root) by manipulating the scoreboard. Non-Unix systems are not affected.
With this server on my Linux based Raspberry pi then I would have been vulnerable to this attack. Also, if my raspberry pi's IP is not static and it restarts then the DHCP server may reallocate the IP to a different one. This means the requests to your website will be going to nothing; it is a hole in your network with no one watching it. It also means your raspberry pi would be listening for traffic on port 80 but the router isn't forwarding to its new IP address.
thans dude ❤️
Welcome
Great content, Tony! I followed along in the video. After replacing my internal URL with my external URL, I can no longer access my my website from RPI. Any ideas of how I can remedy this?
What do you mean that you replaced your internal URL with your external URL?
@@TonyTeachesTech At 8:05 in the video, I replaced the local IP with the external IP in Wordpress. Now I am unable to access Wordpress admin.
@@arashace This will only work if you access WordPress from an external network. If you are connected to your local network, this will not work
Why didn't you use and show a different port?
This is so damn cool
Thanks Jonathan
Cool video. I was wondering if you where going to have problems with cox. They are death eaters. lol
Haha in this instance I agree
Amazing though it seems like I lost my credentials with playing with ex/in addresses 🙃 thanks
You're welcome!
Why not forward port 80 and change the external port to a different number like 1194. That's how you should be doing it anyway for security reasons you never want to leave the port as the default number!
You're right that is a better option
Another solution: Run nginx in a docker container and expose a different port and then port forward that port. This should work.
Why would you keep this video up, w/o updating the introduction?
It doesn’t doing on their servers or is it just the modem? I noticed that you using their modem/router that’s why they want you to go to their portal. I wonder if you get your owned modem router you’ll have better luck. I got my own modem and eero routers better than their stuff.
If you have your own router, then yes that is a better option than what I have showed you in this video since my router is owned by my ISP
This an 2 year old clip, so now there is "twingate" ;-). With twingate you don't need to forward anything on your router, and it allows you to acces ANY device in your LAN over internet. ( This clip shows you how to set it up ruclips.net/video/5up-g_SpLuk/видео.html ) ( You can set it up without an "Identity Provider" )
Same problem, ISP
👎
I find videos where people mess up to be more educational than the videos were there is no mess ups
Haha yeah it can be valuable
yes
:)
Why couldn't you tell us earlier that it might not work on port 80? Now I changed my wordpress url and can't change it back easily. Great thank you!
Sorry
Why didnt you blurr your ip💀😅
I don't mean to be mean. But your video is how to port forward and access you rpi. You didn't do that... I suggest you update the title or finish the job. The content was great but you never finished..
Understand Jonathan. I'm hoping you can take my word that if my ISP wasn't the limiting factor, things would work. Something I didn't try was using another port.