<p>There are a few solutions, but each one needs to match same criteria: an open network socket visible outside the local network.</p>

<p>So from TCP/IP protocol theory, we don't even need to have an IP address to send a packet to another computer as we can use layer One which is just the MAC address to identify the receiver. But things become more complicated when we have to provide a link to two separate endpoints.</p>

<p>Basic requirements:</p>

<ol>
<li>We need to know <em>public accessible</em> IP address and port that server is exposed (listening) on</li>
<li>We can have a DNS entry that will be translated to public IP, but that assume that public IP is same all the time (or we have a dynDNS service)</li>
</ol>

<p>Solutions:</p>

<ol>
<li>Have the RPi exposed with public IP address and routed properly; </li>
<li>Create a VPN bridge from RPi to your home/cloud network and connect Android to the same VPN;</li>
<li>Do a port forwarding to RPi from public IP and expose that in the firewall.</li>
</ol>

<p>So at this point, if you don't have admin access to network devices then only solution '2' is viable, IMHO.</p>

CC BY-SA 3.0
2018-03-23T21:19:39.647Z
The controlling organization of the network to which the printer is connected has not been defined.  If it is a home network, you can usually open a port and have it forwarded to your internal device.  One is unlikely to be able to install a VPN on the printer, but one could expose the network port to the external internet by this method of opening the (or the few) ports required.
cmm
CC BY-SA 3.0
2018-03-23T21:23:47.223Z
As OP says there is no access to router (I had assumption that it could be university printer). That is the reason I'm suggesting 2nd proposal.
profesor79
CC BY-SA 3.0
2018-03-23T21:26:51.063Z
I understand.  The OP would need then to have another RaspPi (or something similar) implementing the VPN, and routing traffic to the printer.  OpenVPN can do that, but I found the setup to be difficult.
cmm
CC BY-SA 4.0
2018-03-16T09:42:02.190Z
2018-05-24T13:12:51.677Z
2018-05-24T13:12:51.677Z
profesor79
<h3>My problem:</h3>
<p>I need to connect to my 3D printer via the internet from an Android app (using IP address and API key).</p>
<p>My 3D printer is based on Marlin firmware latest and connected to a Raspberry Pi running OctoPi. I don't want to use a router and port forward it, because the Raspberry will be connected to internet via a Wi-Fi hotspot.</p>
<h3>My question:</h3>
<p>Is it possible to control the printer using a cloud platform or a server (another Raspberry Pi) if my OctoPi Raspberry Pi can access the internet? If it is possible, how can one do it?</p>
<p>Any suggestions or solutions are welcome.</p>

CC BY-SA 3.0
2018-03-16T08:38:19.887Z
I take it you don't have control over the wifi hotspot? Because a wifi hotspot is able to port forward just as well as a wired router is.
Tom van der Zanden
CC BY-SA 3.0
2018-03-16T09:02:18.213Z
yes i dont have control over the wifi hotspot and it can come from android or even a laptop too
Amrith
<software><printer-building>
Connect to 3D printer via internet without router
Amrith
# Connect to 3D printer via internet without router

(Asked by: username_0 on 2018-03-16)

### My problem:

I need to connect to my 3D printer via the internet from an Android app (using IP address and API key).

My 3D printer is based on Marlin firmware latest and connected to a Raspberry Pi running OctoPi. I don't want to use a router and port forward it, because the Raspberry will be connected to internet via a Wi-Fi hotspot.

### My question:

Is it possible to control the printer using a cloud platform or a server (another Raspberry Pi) if my OctoPi Raspberry Pi can access the internet? If it is possible, how can one do it?

Any suggestions or solutions are welcome.

**Tags:** software, printer-building

> **Comments:**
> **username_1**: I take it you don't have control over the wifi hotspot? Because a wifi hotspot is able to port forward just as well as a wired router is.  
> **username_0**: yes i dont have control over the wifi hotspot and it can come from android or even a laptop too  

---

## 1 answers

### Answer by username_2 on 2018-03-16. Score: 1 | Accepted answer

There are a few solutions, but each one needs to match same criteria: an open network socket visible outside the local network.

So from TCP/IP protocol theory, we don't even need to have an IP address to send a packet to another computer as we can use layer One which is just the MAC address to identify the receiver. But things become more complicated when we have to provide a link to two separate endpoints.

Basic requirements:

1. We need to know *public accessible* IP address and port that server is exposed (listening) on
2. We can have a DNS entry that will be translated to public IP, but that assume that public IP is same all the time (or we have a dynDNS service)

Solutions:

1. Have the RPi exposed with public IP address and routed properly;
2. Create a VPN bridge from RPi to your home/cloud network and connect Android to the same VPN;
3. Do a port forwarding to RPi from public IP and expose that in the firewall.

So at this point, if you don't have admin access to network devices then only solution '2' is viable, IMHO.

> **Comments:**
> **username_3**: The controlling organization of the network to which the printer is connected has not been defined.  If it is a home network, you can usually open a port and have it forwarded to your internal device.  One is unlikely to be able to install a VPN on the printer, but one could expose the network port to the external internet by this method of opening the (or the few) ports required.  
> **username_2**: As OP says there is no access to router (I had assumption that it could be university printer). That is the reason I'm suggesting 2nd proposal.  
> **username_3**: I understand.  The OP would need then to have another RaspPi (or something similar) implementing the VPN, and routing traffic to the printer.  OpenVPN can do that, but I found the setup to be difficult.  

---

