yalegria / devops-git-actions

0 stars 0 forks source link

How to Access a Virtual Machine Server from the Internet #5

Closed Voxelghiest closed 3 years ago

Voxelghiest commented 3 years ago

A prerequisite to being able to utilize SSH file transfer from GitHub to a server is being able to access that server from the internet. When I tried to set up my virtual server to do so, I ran into a number of issues.

The first step in this process is to set your virtual machine to use "Bridged Mode" for its network connections, which treats it as a separate device from your host computer for the purposes of your wireless router. This tutorial provides a simple explanation of how to do that.

The second part is where things get difficult. You have to set up your router to port forward your server so it can be accessed via the internet and GitHub. However, if you happen to have an Xfinity XFi router, your port forwarding settings do not use the usual admin interface that most others do (the one accessed by typing the router's IP into your browser). Instead, you set up port forwards through the Xfinity customer website, which greatly restricts your ability to customize your port forwards. You cannot map ports, nor can you designate IP addresses to be forwarded unless you can access the device from the router (which might not be the case for your virtual machine).

Currently, I am attempting to find a workaround, but I assure you that this is a very frustrating instance of a company restricting customizability because they don't trust the consumer to know what they're doing.

Voxelghiest commented 3 years ago

I spent a couple hours today trying to find a way to get the port forwarding to work. It seems the issue I'm having has to do with the way Xfinity handles port forwards.

As previously mentioned, Xfinity changed the way port forwards are created and handled. If you have an XFi router (as I do), instead of accessing the router's admin panel, you have to go online and do it through your Xfinity account (following the process for XFi users outlined here).

However, even after setting up the port forward for my computer, it wasn't visible from the outside (using a port-scanning website to test).

After contacting Xfinity and Apple for help, here's my best understanding of the problem.

Xfinity's new port forwarding system doesn't work like the usual port forwarding methods. Instead of reserving a static IP address for the device and forwarding the correct traffic to it, it creates a static MAC bind (as an Xfinity employee explains in this forum post).

According to the people at Xfinity I talked to, everything is fine on the router's side. The person I spoke with said that my MacBook needed to be, and I quote, "synchronized with the router". However, even after talking to the customer service people at Apple, they could not figure out what that meant.

I will see if anyone at GRID with more networking experience can help me out here. I need this port forward to work so I can access my virtual Ubuntu server from GitHub and transfer the files.

yuriaru commented 3 years ago

Done.