Skip to content

Use AWS Secure Tunnel Greengrass Component Behind Proxy

1

Is it possible to use the AWS Greengrass Secure Tunneling component behind a proxy? We're using Greengrass behind a proxy, but the secure tunnel component does not seem to work.

Are there any other settings that we need to change, other than the greengrass 'NetworkProxy' object, and setting the proxy variables on the OS itself?

  • The Greengrass Secure Tunneling component should work behind a proxy. What error are you seeing?

    Please make sure to allowlist this data.tunneling.iot.region.amazonaws.com endpoint over 443 as shown in the requirements.

  • Thanks for the answer.

    Will follow with the logs. Just to confirm - there are no steps other than the 'Nucleus' configuration to be done in order to get it to work?

  • You should be following the steps mentioned in the Usage section of the component for it to work as expected.

  • @Saranya - I can see there are some steps here: https://docs.aws.amazon.com/iot/latest/developerguide/configure-local-proxy-web-proxy.html

    Which describe the changes that need to be made. It doesn't seem possible to configure the AWS-provided Secure Tunnel Greengrass component to work with those changes - is that correct?

asked 2 years ago182 views

1 Answer
0

Greeting

Hi Scriobhneoir!

I see you’re working with the AWS Greengrass Secure Tunneling component behind a proxy but encountering challenges. Let’s break this down and figure out what might be missing to get it up and running smoothly! 😊


Clarifying the Issue

You’ve set up the Greengrass NetworkProxy object and configured proxy variables on your operating system, but the Secure Tunnel component isn’t working as expected. You’re asking if additional steps are required beyond configuring the nucleus and are questioning whether the AWS-provided Secure Tunnel component supports the proxy configurations mentioned in the AWS proxy documentation.

It sounds like you’re thorough in your setup so far! Let’s validate the configuration, address any gaps, and identify where the issue might be stemming from.


Why This Matters

Secure tunneling enables secure remote access to devices, especially critical in environments behind proxies or firewalls. Misconfigurations can lead to blocked connectivity or operational inefficiencies, making a solid setup essential for maintaining security and functionality.


Key Terms

  • Greengrass NetworkProxy: Configuration in the Greengrass nucleus to define proxy settings.
  • Secure Tunneling Component: An AWS IoT Greengrass component for establishing secure, remote access tunnels to devices.
  • Proxy Configuration: The settings required for applications to route traffic through a network proxy.
  • Allowlisting: A security practice of explicitly permitting specified endpoints or services.

The Solution (Our Recipe)

Steps at a Glance:

  1. Ensure NetworkProxy is correctly configured in the Greengrass nucleus.
  2. Verify proxy settings on the operating system.
  3. Allowlist data.tunneling.iot.<region>.amazonaws.com over port 443.
  4. Check the Secure Tunnel component logs for errors and troubleshoot.
  5. Validate compatibility with AWS-provided Secure Tunnel component.

Step-by-Step Guide:

  1. Ensure NetworkProxy is correctly configured in the Greengrass nucleus:

    Double-check your config.yaml to ensure it reflects your proxy setup:

    networkProxy:
      httpProxy: http://proxy_address:proxy_port
      httpsProxy: http://proxy_address:proxy_port
      noProxyAddresses:
        - 169.254.169.254

    Replace proxy_address and proxy_port with your proxy’s address and port.


  1. Verify proxy settings on the operating system:

    Export the proxy settings at the OS level. For example, in Linux:

    export http_proxy=http://proxy_address:proxy_port
    export https_proxy=http://proxy_address:proxy_port
    export no_proxy=169.254.169.254
  2. Allowlist the tunneling endpoint:

    Ensure your proxy and firewall permit access to data.tunneling.iot.<region>.amazonaws.com over port 443. Replace <region> with your AWS region, e.g., us-west-2.


  1. Check the Secure Tunnel component logs for errors:

    Logs can provide critical insights into what’s going wrong. Use this command:

    sudo less /greengrass/v2/logs/aws.greengrass.secure_tunnel.log

    Look for common errors such as:

    • Timeouts or connection failures: Indicates the endpoint may not be allowlisted.
    • Proxy configuration errors: Suggests an issue with NetworkProxy settings or OS variables.

  1. Validate compatibility with AWS Secure Tunnel component:

    The AWS-provided Secure Tunnel component has specific requirements. Confirm you’ve met these by reviewing the Secure Tunneling Component documentation. If your proxy setup conflicts, consider raising this issue with AWS Support.


Closing Thoughts

Proxies can sometimes introduce complexity, but by carefully configuring the Greengrass nucleus, OS-level settings, and allowlisting the necessary endpoint, you should achieve a working setup. If the problem persists, reviewing logs and AWS documentation will help pinpoint the issue. Don’t hesitate to share additional logs for further troubleshooting.

For more information:


Farewell

I hope this updated answer addresses your concerns, Scriobhneoir! Let me know how it goes or if you need additional guidance. Best of luck! 🚀✨


Cheers,

Aaron 😊

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.