Here are the steps I used (on debian) which you might find useful.
1.Setting Static IP for the Pi.
a.Open the interfaces file using the command
sudo nano /etc/network/interfaces
b.Change the interfaces file to the following (This works for me I am not sure if a few of the lines can be excluded).
iface lo inet loopback
iface eth0 inet static
Unless you disable it (i.e. by default), Raspbian is running a service called Avahi which responds to mDNS requests in your local network.
By default machines are configured to appear in .local domain, so a fresh Raspbian will be accessible with raspberrypi.local from other machines using Avahi. If you change the hostname, it will be reflected in Avahi ...
Assuming you're running trusty ol' iptables on your Pi (i.e. you haven't replaced it with something else), run this command (either as root or with sudo) on your Pi:
iptables -t nat -A PREROUTING -p tcp --dport 5555 -i wlan0 \
-j DNAT --to 192.168.1.2:4567
You might have to do echo 1 > /proc/sys/net/ipv4/ip_forward before this will work, but I ...
If you are looking for a procedure to change the SSH default port to another port number like 2222, check the SSH config file which is located on /etc/ssh/sshd_config.
sudo nano /etc/ssh/sshd_config
So, you would see Port 22 that you can change it to Port 2222. Then, save the file and restart the SSH service:
sudo service ssh restart
I'm port forwarding on my Raspberry Pi by adding these lines right before the exit line in /etc/rc.local:
# Forward port 80 to 5000 (where our web server is) so the
# web server can run at normal permissions
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5000
This allows me to request on port 80, but have the web server running at ...
The problem got solved by using the following commands:
sudo apt-get install ufw
sudo ufw allow 22
sudo ufw allow 8090
sudo ufw allow 8092
sudo ufw enable
And everything was just fine. Also there was just also a little issue with the web app's splash page.
I thank everyone for all recommendations and answers! I will upvote what I can!
This is a combination of M. Rostami's answer and my reflections on his answer, which I found cumbersome to add as comments.
NB: Your question shows you know how to find your public IP address and the internal address of your Pi. I've included directions here in the hope that they will help others.
On your Pi, set up SSH on the default port number, port 22....
I use an IPsec VPN to connect from the outside, and outside the VPN connection I do not expose any service at all.
Remember that you are exposing your web server at least.
As a bonus points, my VPN is intentionally compatible with the native clients of my Mac and my iPhone.
Relevant thread: DIY Cisco IPSec compatible server for use with iPhones etc.
One thing to check is to make sure that you test connecting via SSH from another computer on a different internet connection. I found with some routers that they reject internal users from connecting via the external IP but allow you to actually connect via the external IP to SSH in.
You can likely try this via a mobile phone (I know androids allow you to ...
To do this you need the IP address of your Pi on your local network. You can get that with ifconfig on the command line. Let's say, for example, that it was 192.168.1.42.
Then you want to forward port 22 from your router to your Pi. (Port 22 is the standard port for ssh.) In the input form that you have, it looks like that will require a row that looks ...
Why use iptables at all if you want a ssh reverse tunnel?
ssh -g -f -N -T -R22222:192.168.1.192:80 email@example.com
Assuming that 192.168.1.192:80 is the address of your camera and port 22222 is the port to listen on the remote server. No iptables, no forwarding needed for this.
You may need to allow the option -g on the server, see sshd_config, set ...
Port forwarded ~ 21 both TCP and UDP
It's actually forward packets to port number 21 which is the default port of FTP. You must change it to port number 22 on your router/switch.
If you are stubborn about changing the default port of SSH which is 22 to another port number, take note that you can set the SSH default port to 21 but the FTP client would be ...
First you'll want to set up port forwarding. Each router is slightly different, so you'll have to look up the specifics for your router.
There are generic port forwarding how-to guides that can work for most routers, but I'd suggest finding a guide for your actual router model.
Set a memorable port to link to your raspberry pi, such as 23456 or something. ...
Most likely - your router is not forwarding the relevant ports. You could set the DMZ, but that opens all of your ports on the pi to the internet. A better option is to log onto your router and forward the following ports to your pi-
22 for SSH
5901 for VNC (probably not a great idea as it's unencrypted. Better to just open port 22 and then tunnel VNC ...
Accessing your RaspberryPi ( or even laptops/servers) from outside your home network (meaning, from the internet) is not an easy task, because your home laptop or RaspberryPi has only local IP address ( in the 10.x.x.x range or 192.168.x.x range). It doesn't have a Public IP address that is visible from the Internet.
The simple answer to your question is ...
This answer isn't Pi-specific, but I'd be tempted to try this:
Use a dynamic dns service to give your pi a domain name. To do this you sign up for a service (some of them are free, a choice of providers is listed on the Wikipedia page for DDNS) and then you run a small daemon on the pi that connects to the DDNS service and updates it with the new IP address ...
To connect to your Raspberry without public IP, you need reverse port forwarding feature of SSH and also running sshd server on the computer with public ip. Lets pretend that pi is your Raspberry and pc is your computer.
pi $ ssh -NTf -R 22:localhost:2222 pc
then you should be able to connect from your pc to your pi as
pc $ ssh -p 2222 localhost
From my experience when connecting to the PI you need to simply add the display number to the port number. For example when connecting to a VNC on display 1 you would use
your.ip.goes.here:5901 (instead of your.ip.goes.here:1)
If the VNC server was on display 2 you would use your.ip.goes.here:5902
Also make sure that the port you are forwarding is the ...
You can use the No-IP client on the Raspberry Pi, there is no need to configure DDNS on the router.
Your Raspberry Pi does not need to know the router's IP address, it's your Dynamic DNS provider who needs to know it.
No-IP client sends a web request containing your device ID (credentials) to the DDNS service provider. The request is relayed using your ...
The Raspberry Pi won't be assigned an external looking IP. Your router, which is given an external IP address via your externally facing modem, passes any traffic on port 80 to the appropriate internal IP address.
Putting this as answer as can't add comment yet. Without being familiar with your router it looks to me like you are forwarding port 446, but also have triggers set for 446 and 6789. Have tried adding an explicit forwarding rule for port 6789?
Having checked the manual for your router (https://www.timewarnercable.com/content/dam/residential/pdfs/support/...
The only port that matters is the internal ssh port and host. If you want to ssh into a machine on your LAN that has a LAN address of something like 192.168.5.5 ---- You would put that address in the internal IP address along with port 22.
The external port doesn't matter, all that matters is that the port you choose is not blocked by your ISP. You would ...
Chain INPUT (policy ACCEPT)
TARGET: Accept, PROT: tcp, OPT: --, SOURCE: anywhere, DESTINATION: anywhere, tcp dpt: 8092
Chain FORWARD (policy ACCEPT)
Chain OUTPUT (policy ACCEPT)
As per Steve's first comment, your culprit here is not iptables, meaning there is no firewall configured on your Pi. The default in this case is the three lines above starting with ...
You could try a port translation in your router’s settings. Say port 22222 from any public IP mapped to port 22 on the Pi’s local IP. Pick any valid port number above 1024. 22222 is just too obvious as an example. You will have to add the chosen port to the ssh command: ssh -p 22222 ....
(I didn’t check that syntax. Look it up.)
First the ssh port is usually port 22 but it can be changed and secondly you only need tcp not udp. Another issue that can crop up is ensuring the pi will accept connections on port 22 from outside your LAN which can be achieved using UFW https://wiki.ubuntu.com/UncomplicatedFirewall
Make sure you set a strong password or better still use SSH keys as you ...
Provided that the SSH server at the PI is actually configured to listen on port 21 instead of the default 22, and that the network public IP address doesn't change.
Then you should just SSH to the public IP address of your network.
>ssh 18.104.22.168 21
login the same way as you do when only using the local (home) network.
Using no-ip or dydns can help ...
The motion package needs a couple of ports open, a web-control port and one or more streaming ports. It looks like the defaults are 8080 for web control and 8081, 8082, etc. for streaming. Port forwarding will forward a port on your edge router to the corresponding port on the Pi running motion.
Do not believe that 'they' will not find your open ports, ...