Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I currently have a setup where I got a raspberry pi connected WIRELESSLY to a router and a WIRED desktop connected to the raspberry pi (via Ethernet) and receiving internet from the pi. On the Desktop I want to run a Minecraft server on port 2000, however, I believe that because of my setup this port can only be seen by the PI alone and any not the router and anything else connected to the router. I currently have the PI ITSELF port-forwarded on the router for port 4300, I just need some way to link the pi's wireless connection of port 192.168.1.55:4300 to the shared Ethernet connection of port 192.168.220.78:2000.
I've looked into messing around with the IPTABLES in Rasbian Linux but I don't fully understand them.
My ultimate goal is to let this server be accessible to anyone outside of my home.
I found the problem, apparently, I needed to accept the incoming connections on the server's computer. So on the same computer as the minecraft server I ran: sudo iptables -A INPUT -p tcp --dport 2000 -j ACCEPT
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have a Raspberry Pi on my network on which I would like to host a website. I don't want to plug it to a monitor but still be able to work on the website.
So I access it via SSH from my main computer to edit the files etc... but I didn't find a way to view the website from my main computer.
I didn't wrote over the 000-default website but created a new one so I see the default Apache page when I type in http://localhost.
I also tried using ssh -X but my main computer is a Mac and I have issues with making X11 work.
So my question is how can I preview from my Mac an Apache website that is not the default one, when the website is hosted on a Raspberry Pi on my network?
Two methods
Setup a VNC connection
Connect using ssh to RPi and prepare it for VNC using sudo raspi-config
at Interfacing options enable VNC and at Advanced options set the resolution. Then use a VNC client on your MAC to connect to RPi
Useful link: https://www.raspberrypi.org/documentation/remote-access/vnc/
Using Local Forwarding
ssh -L 8080:intra.example.com:80 gw.example.com
This example opens a connection to the gw.example.com and forwards any connection to port 80 on the local machine to port 8080 on intra.example.com.
Useful link: https://www.ssh.com/ssh/tunneling/example
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have a conceptual question.
If I have a Java socket (this socket stablish a TCP connection by a channel)
If I run a nc command, the nc command open a tcp connection, then the nc can affect my socket
The same question with telnet, is possible that the telnet affect my socket connection?
Not normally. The operating system will keep those sockets separate. You won't easily affect one socket from another.
If your Java application uses local port 10001 to connect to an HTTPS server on port 443, that socket would be dedicated to that connection between those IPs and ports. IF netcat from the same machine connected to the same server on 443, it wouldn't use the same local ports, and they would not be the same socket.
Now, in unixland at least, open sockets are just file descriptors, and those can be passed between programs. So, for example, your Java application can spawn a new thread and hand the open socket to the thread. But an independent process on the system can't easily just nab data from the open socket.
Of course, these limitations are merely enforced in software, not physical laws, so "anything is possible". But operating systems are going to try to stop this kind of thing from happening.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I installed Ubuntu server 16.04 on one of my computer to setup a web server. I want to install Phabricator to manage a video game project with some friends. I'm trying to configure my router (Home Hub 1000 from Bell) to redirect port 80 to this server. The problem is that it doesn't work at all. I can access to my web page from a computer on my local network with the name of the computer, but not from the outside using my IP address (the one used by my router). I added my server to DMZ and I had set up a port forwarding (Protocol: Both, Internal port: 80, External port: 80). My server use a reserved IP address configured on my router.
Thanks for your help.
Besides of a reserved local ip-address, it is useful to have a static ip-address from your provider(because they might change your ip once and a while). You can find your ip on whatismyip.com
When both port forwarding and DMZ are configured in your router, you can look if there is firewall on your server which blocks the external requests.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have a HTTP enabled device on my local network that listens at let's say 192.168.1.32:9427. What's the simplest way to make public access to that socket?
you need to port forward from public ip address to private ip-address on port no. 9427
example:
public ip : 20.20.20.20
private ip : 192.168.1.32
Now when someone try to access your local http server should access via 20.20.20.20:9427
to do that :
you need to enable that on your adsl modem or on your router device
to do that for your adsl modem from here
How to Port Forward Your Router
check open ports to see if port no. 9427 is opened or not
Open Port Check Tool
you need to allow your iptables if you are using linux machine and allow port no. 9427
to do that :
iptables -I INPUT 1 -p --dport 9427 -s -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a Raspberry Pi running Debian 7 (Wheezy) connected on "Site A", where the network is managed by a third-party company and where all ports are closed to the Internet (for security reasons). So, there is no way for me to do any port forwarding to VNC, nor SSH or anything else. That means I just can't access it in any way other than locally, on-site.
However, I need to connect to that device on the X Desktop session (graphical interface) to do some maintenance, and I am located in let's say "Site B", which is nearly 300 miles away from site A.
I know you can do such tasks on Windows or x86 Linux computers with TeamViewer (we use it for our other hardware in the same location and it works like a charm), but since the Raspberry Pi is based on an ARM architecture, it isn't supported by TeamViewer yet.
If anyone has ever achieved this, I would be glad to hear how to do it!
Since you have no ssh access, I can safe you from going on site A once.
I would setup a reverse ssh tunnel for ssh and VNC to a computer on the raspberry:
nohup ssh -N -R 3000:localhost:22 you#site-b &
nohup ssh -N -R 3001:localhost:5900 you#site-b &
You might implement some "watchog" which reconnects the tunnels if they should get disconnected for some reason. I assume that a VNC server is already running on the raspberry.
On site B you can now use:
ssh -p 3000 localhost # ssh to raspberry.
or VNC to the raspberry using localhost:3001