I have this weird problem with a VM running HAProxy.
Here's my setup.
VM#1
Firewall is enabled on DataCenter, the host, the VM, and all the NIC (VirtIO). There 3 rules set at DataCenter level to allow VNC, SSH and SPICE. No rules set host. VM rules see above.
The security group is set as such:
All VMs are running Ubuntu 18.0.4 LTS, using VirtIO interface. This is all running on a single host.
With the above setup. when I run "gitlab-runner verify" inside VM#3. I will get a I/O or TLS handshake timeout. Trying to browse the Gitlab site (using lynx) also results in an error. I just cannot get this VM#3 to connect to VM#1 at port 443. Netstat output from VM#1:
But if I try to connect from a normal PC (Different subnet), it works fine. I can also connect to Gitlab from the Internet.
I have tried adding the interface (net0) or leaving it blank, same problem. The only way to get VMs to connect is if I disable firewall on VM#1 (HAProxy) entirely.
With firewall activated on VM#1, what is stopping the VMs from talking to VM#1, but allowing Internet to pass through? This has to be a simple user error, but I can't seem to identify the problem. And I had already spent a week working on this.
Any help will be appreciated. TIA.
Here's my setup.
VM#1
- Runs HAProxy listening at 443
- Subnet is 192.168.222.0/24
- Handles all my SSL certificates
- Based on the name, it will forward the HTTPS request to VM#2 at port 10000
- Firewall rules:
- Runs docker
- Subnet is also 192.168.222.0/24
- Runs gitlab in a container, only mapping out port 443 to 10000 (i.e. 22/tcp, 80/tcp, 0.0.0.0:10000->443/tcp)
- Firewall rules:
- Gitlab-runner, register to gitlab in VM#2
- Subnet is 192.168.101.0/24
- So the URL of Gitlab actually points to VM#1, which in turn proxies it back to VM#2
- Firewall rules: None set
Firewall is enabled on DataCenter, the host, the VM, and all the NIC (VirtIO). There 3 rules set at DataCenter level to allow VNC, SSH and SPICE. No rules set host. VM rules see above.
The security group is set as such:
All VMs are running Ubuntu 18.0.4 LTS, using VirtIO interface. This is all running on a single host.
With the above setup. when I run "gitlab-runner verify" inside VM#3. I will get a I/O or TLS handshake timeout. Trying to browse the Gitlab site (using lynx) also results in an error. I just cannot get this VM#3 to connect to VM#1 at port 443. Netstat output from VM#1:
Code:
tcp 0 0 192.168.222.40:443 192.168.101.63:57302 SYN_RECV
tcp 0 0 192.168.222.40:443 192.168.101.63:57304 SYN_RECV
But if I try to connect from a normal PC (Different subnet), it works fine. I can also connect to Gitlab from the Internet.
I have tried adding the interface (net0) or leaving it blank, same problem. The only way to get VMs to connect is if I disable firewall on VM#1 (HAProxy) entirely.
With firewall activated on VM#1, what is stopping the VMs from talking to VM#1, but allowing Internet to pass through? This has to be a simple user error, but I can't seem to identify the problem. And I had already spent a week working on this.
Any help will be appreciated. TIA.