Learn how to port forward so you can access your Raspberry Pi via SSH from anywhere in the world over the internet. Find more at tonyteaches.tech Check out my vlog channel @TonyFlorida #raspberrypi #ssh #portforwarding
Пікірлер: 104
@prashanthb6521 Жыл бұрын
One friendly suggestion. Please draw network diagrams and corresponding animations to explain how the ports are forwarded or where the ports are open and where it needs to be forwarded.
@jonathanflores3748Ай бұрын
Not all the tutorials go as smooth as this one, even though I had another internet supplier it still worked fine. Thank you for the help.
@alaaalotaibi62019 ай бұрын
man this is really helpful, easy and straightforward
@Figworm2 жыл бұрын
I know in the video, the file hi.txt was new, so :wq is perfectly fine. Tip: Get in the habit of using :x instead of :q or :wq with vi variants. When just reading/viewing a file, using :x will exit without modifying the file's timestamp (useful with backup solutions that use in part, file timestamps for backups). Where as :q will modify the file's timestamp, regardless if the file was edited or not. Also, :x acts the same as :wq for modified files.
@williamhdixon Жыл бұрын
I've always used ZZ with the vi editor. If you've changed anything, it saves and exits, just like :wq. But if you haven't changed anything, it just exits, leaving the original file untouched. For me, as long as it isn't one of those "oh no I made a mistake" moments, it's the same keystrokes whether I changed the time, or it looked okay once I got in and looked at it.
@anthonymclaughlin92222 жыл бұрын
Thanks, great video really clearly explains the solution in only 8 minutes!!
@TonyTeachesTech2 жыл бұрын
You're welcome Anthony
@garokejelian565 Жыл бұрын
Thanks you solved my problem with a simple explanation
@filipk7292 жыл бұрын
Perfect, this it exactly what I was looking for. Answer to all my questions related to the remote ssh. Thank you kindly!
@TonyTeachesTech2 жыл бұрын
You are welcome!
@andymann6061 Жыл бұрын
Me too!
@ArthursHD Жыл бұрын
Don't expose SSH and RDP like this to the internet without hardening!
@brunomattosrj Жыл бұрын
Tony, you are incredible!
@zookoong82142 жыл бұрын
As a newbie, this video helps me perfect!!!!! Thanks I've subscribed and clicked thumbs up!!!!! Thanks!!!
@TonyTeachesTech2 жыл бұрын
Thank you so much for your support
@bennicolai10632 жыл бұрын
I rarely like stuff, but this gets one from me. Very good video, helped a lot. Thanks
@TonyTeachesTech2 жыл бұрын
You're welcome Ben
@vaibhavpatil9956 Жыл бұрын
Thanks Tony!!
@koka5491 Жыл бұрын
Thank you, i've been searching for a solution forever
@TonyTeachesTech Жыл бұрын
You are welcome!
@RazahLP2 жыл бұрын
Thank you, very helpful!
@TonyTeachesTech2 жыл бұрын
You're welcome!
@STMONDEO12 ай бұрын
Hi Tony Thanks for the video about port forwarding. As i have been struggling to get my raspberry pi to work over the internet with port forwarding. Thanks for your video. Peter
@TonyTeachesTech2 ай бұрын
You're welcome! Thanks for subscribing
@iflashlantern4292 Жыл бұрын
This video answered my questions perfectly. I just have one quick question. While researching port forwarding I've seen a lot of people online talking about risks to brute force attacks from outside. I just want to be able to SSH into and communicate over TCP with my raspberry pi while I'm in school. My pi is running Ubuntu Server 20.04.5. If I enable the firewall on my pi, do you think everything would be safe? Edit: nevermind, I found out I could just set the Ubuntu firewall (ufw) to only accept tcp connections (and ssh) over port 22 coming from specific IPs. i have it set to only accept form my router and my laptop's local (home network) ip address. once i get to school i'll add my computer's local ip from their network. i *think* this will be safe.
@johnb6767 Жыл бұрын
Thanks Tony
@TonyTeachesTech Жыл бұрын
You're welcome!
@kychemclass5850Ай бұрын
Maybe they blocked port 80 to encourage you to use HTTPS on 443. Did you check if they allow 443?
@oskarnygards88562 жыл бұрын
Thanks a lot! :-)
@TonyTeachesTech2 жыл бұрын
You're welcome
@lukasthielen3023 жыл бұрын
great job. can you also set up two individual server/raspberry pi in your local network and access them both via port 22 or should each use a dedicated port?
@TonyTeachesTech3 жыл бұрын
Yes you can do that
@nicofish10002 жыл бұрын
thank you. I had my ssh server locally, but now that we can leave our houses again I need to be able to access it from elsewhere.....
@MPElectronique Жыл бұрын
Hey, thanks for the video. Is it possible to access multiple local webserver??
@Probler7 ай бұрын
This is a long time after u posted ur video but I really hope u see and answer my question. I don't really know and have my ip momorised at all times so I would like to connect to my ssh hosing my domain name, is that possible? And is there extra setup required or no?
@daurham2 жыл бұрын
Great video! Will running a server on this port allow me to connect to it? Or is SSH different in some fundamental way? I’ve only used it for remote connecting, so the concept isn’t landing for me
@shriram5494 Жыл бұрын
you could run a server on port 22 and connect to it through the url ipv4address:22 on your web browser
@leozhang13404 ай бұрын
Is that port number 22 you entered the internal or external port? I have both available for me to edit.
@user-zo8ry4wr9y3 ай бұрын
Can we connect VNC as well ?
@nhs.14 Жыл бұрын
what happen if you dont have static ip for your router? most isp wont give static ip for cheap internet subscription
@ryandickinson47382 жыл бұрын
Do you need a static ip address to do any of this ?
@illumi1749 Жыл бұрын
on my router it says to input a LAN and WAN port should i just do 22 for both
@joseponce95673 жыл бұрын
Nice video, I suposse if you have an active NGINX server running in the Raspberrypi, you will access directly to the web service developed?
@TonyTeachesTech3 жыл бұрын
Not sure I understand your question, but I do have a video about accessing an Nginx site on Pi here kzbin.info/www/bejne/d3fIqphnr7GjfNE
@DrsJacksonn11 ай бұрын
Can you also use other ports than 22?
@satejratnaparkhi Жыл бұрын
How to make router ip static without purchasing?? I tried some services like no-ip but when the router reboot or sometimes later the public IP get's changed and if I'm outside I don't know the public IP of my router then how I can ssh cause no ip also not changing the previous ip to new. Plz help......
@danieldenhartog23092 жыл бұрын
Hi! Just a little heads up. I forwarded port 5900~5910:TCP on my modem (this port is for VNC) and was able to use my 'whatsmyIP' IP-adress as connection adress in VNC viewer. This was sufficient to be able to remotely control my RPi! For me, the SSH port did not work, so this might be a solution for anyone with the same problem! :) Cheers
@TonyTeachesTech2 жыл бұрын
Nice workaround :)
@timt2708 Жыл бұрын
Weirdly, that worked, but ssh didnt. THANKS M8!
@airbus5717 Жыл бұрын
if i have a pdf on the raspberry pi how do i view it on the phone?
@astroid90872 жыл бұрын
If I want to ssh to 2 rpi How do I choose which one? 🤔 👍
@billloveless68692 жыл бұрын
Do you have to use the ports you listed? Thanks
@TonyTeachesTech2 жыл бұрын
You can technically ssh with any port
@Lp-ze1tg3 жыл бұрын
Would that be a problem if the user plans to setup IPFire on the same network?
@TonyTeachesTech3 жыл бұрын
I don't know, sorry
@taleivenvencatalapillay2039 Жыл бұрын
can you tell me how to give someone access to your pi using your router
@taleivenvencatalapillay2039 Жыл бұрын
can you pls tell me how to give someone access to your pi with your public ip
@chandandhiman805723 күн бұрын
This will only work with static ip not dynanic ip aadress
@sciencekhuong2 жыл бұрын
Can you port forwarding proftpd?
@TonyTeachesTech2 жыл бұрын
I don’t know sorry
@ignaciohdi Жыл бұрын
Is there any kind of risk for doing this on a RaspberryPi 4, i don't think Raspberry has a firewall, and if it has it, it might not be as safe as the one in windows 10
@AR-15K1 Жыл бұрын
Use ufw
@timgiaychuyenadidasreal48002 жыл бұрын
how to enter wifi password for raspberry through phone using app or webserver??
@TonyTeachesTech2 жыл бұрын
Sorry I don't know
@thomasperri32942 жыл бұрын
Is this safe to do? Is a VPN recommended?
@TonyTeachesTech2 жыл бұрын
A VPN won't help in this case. There is risk anytime you open a port to your local network.
@miloszfedorowicz53822 жыл бұрын
Is this safe ? I mean every other tutorial to do this uses a VPN, I don't know why if it's that simple !
@devtest82592 жыл бұрын
You can make a new port number and assign it to http requests. Nothing they can do to stop it.
@doomtomb323 күн бұрын
no mention of security. there's bot farms out there checking all IPs they can find for port 22. Then they gonna brute force your usernames like root, admin, etc. Linux does not recommend changing root username, so you are kind of stuck. You could at least use a random port for ssh instead of 22.
@TonyTeachesTech23 күн бұрын
Security by obfuscation is not a good technique
@delmoteperrin65842 жыл бұрын
But what I can do if the raspberry is connected with a 4G modem?
@TonyTeachesTech2 жыл бұрын
Can you port forward on your modem?
@delmoteperrin65842 жыл бұрын
@@TonyTeachesTech I don't know how to do this. It's a USB modem 4 G
@gene_Code Жыл бұрын
if you ISP gave u a NAT'ed IP address to your router then it is impossible to do port forwarding.
@tngdwn83504 ай бұрын
Yeah, I faced this problem, at least I think so. Do you know if it's possible to circumvent it by using IPv6? Somehow I failed using IPv6.
@hasanmuhammod2 жыл бұрын
Hey, will it work if I don't have a real ip? Cause I have a shared ip
@TonyTeachesTech2 жыл бұрын
As long as you have ssh access (with a username and password) to the server
@meeskees42275 ай бұрын
What to do if you have multiple raspberry pi’s?
@fun_blade99652 ай бұрын
u just change the hostname of the each raspberry pi differely
@jonny777bike2 жыл бұрын
How long that address though
@TonyTeachesTech2 жыл бұрын
What?
@jonny777bike2 жыл бұрын
@@TonyTeachesTech I guess I didn't fully ask the question. How long does that address last. I really need to learn how to do Dynamic DNS. I still can't understand why we would need dynamic addresses with IPv6.
@TonyTeachesTech2 жыл бұрын
@@jonny777bike That will depend on the lease time defined by your internet service provider
@miningcraft1122 Жыл бұрын
you should blur the IP address to avoid any DDoS
@tngdwn83504 ай бұрын
Nah, the IP is changing. When he uploaded the video it wasn't "his" IP anymore.
@THE_PERSON4204Ай бұрын
bro just revealed his full ip adress💀💀
@iliketodostuff1232 жыл бұрын
Umm my guy just showed us his public ip witch anyone can us to track him.
@TonyTeachesTech2 жыл бұрын
No worries, that was a temp IP that I'm no longer associated with :)
@yktserea2214 Жыл бұрын
Bluh
@yktserea2214 Жыл бұрын
Xh
@villocity57942 жыл бұрын
hehe cox hehehe
@TonyTeachesTech2 жыл бұрын
😅
@cheapproductions6389 Жыл бұрын
hopefully he's using a VPN
@ArthursHD Жыл бұрын
don't expose SSH and RDP like this to the internet without hardening!
@IsaacEarl-eh9rz2 күн бұрын
He just gave us his IP adress...... hope nobody DDos' him