AWS - Unable to ping GNS3 router from another server

We want to have a Test cloud virtual network that allows us to make an snmp-get over multiple virtual devices. To achieve this I am using GNS3. Now, we just deployed a GNS3 Server on EC2 (Ubuntu 18), but we can't ping nor snmp get any router outside the GNS3 server. We can ping these devices while we are in the GNS3 server, but this does not work from another server or my computer.

The GNS3 server already created and deployed. The VPG, Site to site VPN, and VPC are already created, and the servers were added to this VPC.

Answers 1

  • After some weeks of research, our team found the solution, if anyone is having this same problem consider these important points in your AWS configuration:

    1. Server A (GNS3) must be in a different Subnet than Server B (Test server that you want to ping from).
    2. A Route Table must be created in AWS config pointing to the GNS3 ips.
    3. Configure the NAT in Server A (In my case is an Ubuntu 18) using the following instructions:

    Set up IP FORWARDing and Masquerading

        iptables --table nat --append POSTROUTING --out-interface ens5 -j MASQUERADE
        iptables --append FORWARD --in-interface virbr0 -j ACCEPT

    Enables packet forwarding by kernel

    echo 1 > /proc/sys/net/ipv4/ip_forward

    Apply the configuration

    service iptables restart

    This will allow your virtual GNS3 devices in Server A to be reached from Server B (A more detailed explanation here). Additionally, you might want to test an SNMP-WALK from Server B to your virtual device in Server A (a router in my case).

    If this does not work try debugging using flow logs in AWS and looking if server A is effectively receiving the requests.

Related Articles