5/21/2023 0 Comments Raspberry pi ssh tunnel![]() ![]() ![]() What it means is that the NAT rules (such as your forwarding one) are not applying when the origin of the connection is from your internal LAN. Now why it does not seem to work is probably because your router does not support NAT loopback. ![]() The only thing you seem to have misconfigured is that SSH is a TCP only protocol, so you do not need to forward UDP traffic on port 22. Then configure your port forwarding to your new static IP, and it should all work! Best of Luck! Run sudo reboot and your IP should be in place! Log back in and run the ifconfig command again, and it should look like this now: ![]() Press Ctrl+ O and either Enter or Y and then Enter. Gateway – This is the 'Gateway' address we found earlier. You can also grab this off your router, it should say on the side somewhere.īroadcast – The 'Bcast' address we wrote down earlier. Network – The router IP address, this is the 'Destination' Address was found earlier. netmask – The 'Mask' address we wrote down earlier. Higher is better, as there is less chance of IP conflicts. address 192.168.1.81īasically, the address part is what you want your IP to be. You will need your own addresses we gathered above). Then directly below this line enter the following ( Please Note. Now that we have that info, we can edit the interfaces file to set up the dynamic IP. Obviously, your info will be different from this tutorial, so make sure you use your info from the ifconfig command run on the Pi. eth0 Link encap:Ethernet HWaddr b8:27:eb:b3:fc:2c This reveals your router information, the bit you want is after eth0 (the ethernet connection). I know you already ran it, but we need to gather a little more info that your local IP this time. Grab a pen and some paper, you're going to be writing down some info. I'll also explain the simple way below:Ĭonnect to your Pi either via SSH within your home network or via a screen, either works. You can read a little more in depth here and here. It's relatively simple, so long as you don't mind mucking about in a config file. The simplest way to fix this (at least that I have seen) is to set up a static IP. Part of your issue could be that because the Pi is using a dynamic IP from the DHCP on your router, the port forwarding you set up isn't working, as the Pi's local IP has changed. My question: Am i missing any steps? Are there config files I should be editing on my pi to make everything work? I have also tried connecting from a different location and nothing works. It works when I try to connect inside my LAN using my local ip, but not using my host name or internet ip address.
0 Comments
Leave a Reply. |