Skip to content

Localhost overriding cloud hosted instances trying to open attacker, defender, etc. #43

Description

@KazeEnji

Describe the bug
I installed GRFICSv3 on an EC2 instance in AWS. When I browse to the EC2 IP:80, the simulation loads but none of the buttons on the left ever get past starting status. Clicking on them opens a new tab in my browser attempting to navigate to http://localhost:8080 or whatever appropriate port. This causes an issue since the sim isn't running locally. Instead it just doesn't load.

When I manually replace localhost with the IP of my EC2 instance, it works. I'm able to navigate to Kali, Defender, etc.

I'm not sure if remote hosting was envisioned when this project was made so maybe this is less of a bug report and more of a feature request in that case? This may also cause a problem if I attached a domain name to the instance. I'm not sure how the current code would handle clicking the attacker workstation button and having it go to kali.mydomain.com instead of an IP or localhost.

To Reproduce
Steps to reproduce the behavior:

  1. Host on a Cloud instance. I use EC2 on AWS but the bug would likely be present on any remote hosted instance.
  2. Navigate to the main sim page.
  3. Click on any of the four buttons on the left to navigate to another view, the attacker workstation for instance.

Expected behavior
A new tab should open navigating to the appropriate view. The health checks should get past starting status as well.

Versions (please complete the following information):

  • OS: EC2 Ubuntu 24.04
  • Browser Firefox, Librewolf, Edge
  • Version: Latest for all three listed browsers, latest patches for 24.04 EC2 Ubuntu via apt.
  • Build type: Docker Hub

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions