I am configuring a virtual machine to host an API for an application.
I entered the vCloud director
page and followed these steps:
Generated the edges network
Created a VDC organization network (192.168.0.1/24 as a gateway and a pool of addresses from 192.168.0.2 to 192.168.0.10)
Created a vApp and added a virtual machine (connected its NIC to the VDC I created earlier).
Installed VMWare Tools on the machine and booted it up with force guest OS configurations
Up until now, it all went perfectly. I booted up the machine and pinged my gateway, I had a connection to the gateway (which seems like a good start). Next, I tried to ping 8.8.8.8
but got the following response:
From 192.168.0.1 tcmp_seq=420 Destination Net Unreachable
I thought maybe I need to set up firewall and NAT rules, so I added the following rules:
Firewall rule for tcp on port 443 both external-internal and internal-external
Firewall rule for TCP on port 80 both external-internal and internal-external
Firewall rule for UDP on port 53 both external-internal and internal-external
SNAT rule with source address pool of 192.168.0.1-192.168.0.10 (gateway address + address pool from Organization VDC) and translated source IP obtained from my edge settings.
DNAT Rule with original IP address obtained from my edge settings and translated IP address / pool same as the source in my SNAT rule (192.168.0.1-192.168.0.10)
Here is the output from ifconfig
:
Here is the output of lshw -C network
:
Here are pictures of my firewall and NAT rules:
ip route show
output:
default via 192.168.0.1 dev ens160 proto static
192.168.0.1/24 dev ens160 proto kernel scope link src 192.168.0.4
Really sorry for the terminal pictures, couldn't copy-paste from the web console. If that's an issue LMK and I will use lense to copy the text from the images and put it instead of the images.
PS: This is my first time working with servers this way, so if I am doing something stupid, don't refrain from pointing it out. I am more used to out-of-the-box solutions such as Digital Ocean, and Google Cloud where the network is already configured. This is completely new to me, especially the virtualization part. I did some networking back in high school but we did that with physical components, not these virtual components.
0 Answers