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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
If you want to do this via port forwarding, then your colleagues will need to configure the router / firewall at the remote location. This may or may not be possible depending on a variety of factors, including but not limited to: 1. Whether they have access to the router / firewall to make changes, 2. whether something else on the remote network is already ...
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 ...
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!
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 ...
What does 'myapp' do ?
Are you sure it does listen on port 8181 of the container's external interface (or on all interfaces) ?
Are you sure 'myapp' starts correctly ?
$ docker logs <container id>
give you any error or debug message ?
If your images contains netstat, the output of
$ docker exec <container id> netstat -lnp
would show ...
It sounds like you have enabled port forwarding to your laptop's internal IP. Unless your laptop and PI are on the same IP address you would need to change the existing forward or add another to the PI's IP addr.
If you want to expose your RPi via the router's port forwarding feature, the RPi should be connected directly to the router. Right now, there is your laptop between the two, and I expect it is not configured to forward packets from its WiFi interface (connected to the router) to its Ethernet interface (connected to the RPi). As a result, the connection ...
The IP addresses you cite are indeed private addresses and exist only within the scope of your router/LAN. To allow access from outside, you may want to consider a dynamic domain name - freemium services like https://www.noip.com/ provide this. They also give pointers to help with port forwarding issues.
I have set up several RPis with NoIP domain names ...
The range you're mentioning are private IP addresses (for local network only)
You can verify the raspberry private IP with the ifconfig command, and verify if the port 80 is really open and listening with a browser by going to that IP.
If you configured the port forwarding correctly in your router, every request made to your router's public IP will be ...
What you really want is a VPN-Server. L2TP would be what you want as the much simpler PPTP is no longer supported by newer devices. I have a RPi running at home for exactly this purpose. I can access any device in my home network remotely from my MacBook Pro, iPhone and Windows 10.
There is a fairly easy setup script for that on github.
Read everything ...
If you connect to your Raspberry without naming the port to be used it normally uses port 22. You're using that to connect to it locally, right?
That means your Raspberry accepts connections over port 22. However, if you add -p 25 it will try port 25 but it seems that it's not configured to use that one.
You should take a look into ...
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 ...
Have we got any ideas? Probably.
Try opening up your firewall using iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Maybe your router (or Pi) uses DHCP and your port forward isn't valid anymore. Try running ifconfig -a and check the IP of your network interface (probably eth0).
Check if inet addr still matches the one on your port forward.
Double-check your ...
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 ...