Allow inbound access to the LlamaIndex browser application

Create a firewall rule in Google Cloud console to expose port 8000 for the browser-based LlamaIndex RAG application.

Configure the firewall rule in the Google Cloud console

To configure a firewall rule:

  1. Navigate to the Google Cloud console .
  2. Go to VPC Network > Firewall, and select Create firewall rule.

Image Alt Text:Google Cloud console VPC Network Firewall page showing the Create firewall rule button in the top menu barCreate a firewall rule in Google Cloud console

  1. Set Name to allow-llamaindex-port, then select the network you want to bind to your virtual machine.
  2. Set Direction of traffic to Ingress, set Action on match to Allow, set Targets to All instances in the network, and set Source IPv4 ranges to 0.0.0.0/0.

Image Alt Text:Google Cloud console Create firewall rule form with Name set to allow-llamaindex-port and Direction of traffic set to IngressConfiguring the allow-llamaindex-port firewall rule

  1. Under Protocols and ports, select Specified protocols and ports.
  2. Select the TCP checkbox. For Ports, enter 8000. Port 8000 is used by the FastAPI server that backs the browser-based LlamaIndex RAG application.

Image Alt Text:Google Cloud console Protocols and ports section with TCP selected and port 8000 enteredSetting the LlamaIndex browser application port in the firewall rule

  1. In the same TCP field, also add port 22 to allow SSH access to the VM.
  2. Select Create.

What you’ve accomplished and what’s next

You’ve now created a firewall rule that exposes port 8000 for the browser-based LlamaIndex RAG application and port 22 for SSH. You’ll attach this firewall rule to your virtual machine in the next section.

Next, you’ll create a Google Cloud C4A virtual machine and connect to it using SSH.

Back
Next