LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Allowing traffic to a VM (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/allowing-traffic-to-a-vm-4175691814/)

rrog 03-09-2021 08:38 PM

Allowing traffic to a VM
 
Hey guys,

So I'm having an issue with port forwarding - and could really use a tip or two on how to get things working... Here is my senario:

I'm running Linux on a VM I've created on a ESXi Hypervisor

The Linux machine has a private IP in my home network (192.168.1.94).

I have setup our route to forward any requests on all ports to this system, (also tried selective ports like 22/80) - but

No matter what, I cannot seem to have anyone from the outside world touch these systems.

Looking at the logs, it seems I'm getting some blockage in terms of my router address... but I thought I have it all open for port 80.

Anyone else run into this? any tricks or help would be supper appreciated.

Thanks all

Emerson 03-09-2021 08:44 PM

Check if your ISP is blocking it.

berndbausch 03-09-2021 11:49 PM

I suppose ESXi has several ways of attaching the VM to the network. With other hypervisors like KVM or VirtualBox, default attachment is NAT, which requires port forwarding to access the VM. I have had countless situations where I could not reach a VM because I had set up the network attachment incorrectly.

So, in order to help you, it would be good to know:
  • how does ESXi attach the VM
  • from where and how are you trying to connect to the VM (if you issue commands, show the commands)
  • where do you define the route you mention, and what is that route precisely
  • which logs did you check, what do you mean by "blockage in terms of my router address", and how do you come to that conclusion
  • the network topology

rkelsen 03-10-2021 05:22 AM

Allowing traffic to a VM
 
What services is it running that you're trying to access? Can you ssh in?

It's quite unusual to want all traffic to be allowed through a firewall and redirected to one machine.

Perhaps provide more details about what you are trying to achieve.

What kind of server are you trying to build?

Beware that as suggested above, most ISPs will block "commercial" traffic on home networks. You can't run a web server from home, for example.

rkelsen 03-10-2021 06:23 AM

Quote:

Originally Posted by berndbausch (Post 6228969)
I suppose ESXi has several ways of attaching the VM to the network. With other hypervisors like KVM or VirtualBox, default attachment is NAT, which requires port forwarding to access the VM.

ESXi is a type 1 hypervisor, which works quite differently to the ones you mentioned.

VMs operating under ESXi are configured by default to operate the same way as any other machine on your network. That is to say that the hypervisor acts as a virtual switch by default, and you don't need to set up any port forwarding to access the VMs.

dc.901 03-10-2021 07:33 AM

Quote:

Originally Posted by rrog (Post 6228943)
I have setup our route to forward any requests on all ports to this system, (also tried selective ports like 22/80) - but

No matter what, I cannot seem to have anyone from the outside world touch these systems.

Looking at the logs, it seems I'm getting some blockage in terms of my router address... but I thought I have it all open for port 80.

Before starting to look at this from "outside"; let's look at "inside"...
On your Linux VM; are the ports actually open? Look at output of: netstat -ntlp

Is there a firewall on your Linux VM? If so, are these ports allowed thru that firewall?
Try to access port 80 (or 22) from another machine on the same network. Does that work?

jmgibson1981 03-11-2021 07:23 PM

Simple question. Do you have a static ip? Generally for any server stuff you will need a static ip. In my area a static ip isn't just nice to have. It's the only way to get mostly unrestricted access to ports. They may all be blocked on the isp side as they don't want people running servers on them.

rrog 03-11-2021 09:53 PM

Hey Jim and everyone that replied... I'm afraid to admit - I think you guys are right.. looks like telus blocks these ports for "residential" users.. (me).

Thank you guys - this one now makes sence.. still sucks, but at least I know.

Thanks again all!

Quote:

Originally Posted by jmgibson1981 (Post 6229524)
Simple question. Do you have a static ip? Generally for any server stuff you will need a static ip. In my area a static ip isn't just nice to have. It's the only way to get mostly unrestricted access to ports. They may all be blocked on the isp side as they don't want people running servers on them.



All times are GMT -5. The time now is 10:38 AM.