Menu
Amazon EMR
Management Guide

Option 2, Part 2: Configure Proxy Settings to View Websites Hosted on the Master Node

If you use an SSH tunnel with dynamic port forwarding, you must use a SOCKS proxy management add-on to control the proxy settings in your browser. Using a SOCKS proxy management tool allows you to automatically filter URLs based on text patterns and to limit the proxy settings to domains that match the form of the master node's public DNS name. The browser add-on automatically handles turning the proxy on and off when you switch between viewing websites hosted on the master node, and those on the Internet. To manage your proxy settings, configure your browser to use an add-on such as FoxyProxy or SwitchySharp.

For more information about creating an SSH tunnel, see Option 2, Part 1: Set Up an SSH Tunnel to the Master Node Using Dynamic Port Forwarding. For more information about the available web interfaces, see View Web Interfaces Hosted on Amazon EMR Clusters.

Configure FoxyProxy for Firefox

You can configure FoxyProxy (Standard) for Google Chrome, Mozilla Firefox, and Microsoft Internet Explorer. FoxyProxy provides a set of proxy management tools that allow you to use a proxy server for URLs that match patterns corresponding to the domains used by the Amazon EC2 instances in your Amazon EMR cluster. Before configuring FoxyProxy, you must first create an SSH tunnel using dynamic port forwarding. For more information, see Option 2, Part 1: Set Up an SSH Tunnel to the Master Node Using Dynamic Port Forwarding.

Note

The following tutorial uses FoxyProxy Standard version 4.2.4 and Firefox version 24.7.0.

To install and configure FoxyProxy in Firefox

  1. Download and install the Standard version of FoxyProxy from https://addons.mozilla.org/firefox/addon/foxyproxy-standard/.

  2. Using a text editor, create a file named foxyproxy-settings.xml containing the following:

    Copy
    <?xml version="1.0" encoding="UTF-8"?> <foxyproxy> <proxies> <proxy name="emr-socks-proxy" id="2322596116" notes="" fromSubscription="false" enabled="true" mode="manual" selectedTabIndex="2" lastresort="false" animatedIcons="true" includeInCycle="true" color="#0055E5" proxyDNS="true" noInternalIPs="false" autoconfMode="pac" clearCacheBeforeUse="false" disableCache="false" clearCookiesBeforeUse="false" rejectCookies="false"> <matches> <match enabled="true" name="*ec2*.amazonaws.com*" pattern="*ec2*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*ec2*.compute*" pattern="*ec2*.compute*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="10.*" pattern="http://10.*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*10*.amazonaws.com*" pattern="*10*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*10*.compute*" pattern="*10*.compute*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false"/> <match enabled="true" name="*.compute.internal*" pattern="*.compute.internal*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false"/> <match enabled="true" name="*.ec2.internal* " pattern="*.ec2.internal*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false"/> </matches> <manualconf host="localhost" port="8157" socksversion="5" isSocks="true" username="" password="" domain="" /> </proxy> </proxies> </foxyproxy>

    This file includes the following settings:

    • Port 8157 is the local port number used to establish the SSH tunnel with the master node. This must match the port number you used in PuTTY or terminal.

    • The *ec2*.amazonaws.com* and *10*.amazonaws.com* patterns match the public DNS name of clusters in US regions.

    • The *ec2*.compute* and *10*.compute* patterns match the public DNS name of clusters in all other regions.

    • The 10.* pattern provides access to the JobTracker log files in Hadoop 1.x. Alter this filter if it conflicts with your network access plan.

  3. Choose Firefox > Add-ons.

  4. On the Add-ons tab, to the right of FoxyProxy Standard, choose Options.

  5. In the FoxyProxy Standard dialog, choose File > Import Settings.

  6. Browse to the location of foxyproxy-settings.xml, select the file, and choose Open.

  7. Choose Yes when prompted to overwrite the existing settings and then choose Yes to restart Firefox.

  8. When Firefox restarts, on the Add-ons tab, to the right of FoxyProxy Standard, choose Options.

  9. In the FoxyProxy Standard dialog, for Select Mode, choose Use proxies based on their pre-defined patterns and priorities.

  10. Choose Close.

  11. To open the web interfaces, in your browser's address bar, type master-public-dns followed by the port number or URL.

    For a complete list of web interfaces on the master node, see View Web Interfaces Hosted on Amazon EMR Clusters.

Configure FoxyProxy for Google Chrome

You can configure FoxyProxy for Google Chrome, Mozilla Firefox, and Microsoft Internet Explorer. FoxyProxy provides a set of proxy management tools that allow you to use a proxy server for URLs that match patterns corresponding to the domains used by the Amazon EC2 instances in your Amazon EMR cluster. Before configuring FoxyProxy, you must first create an SSH tunnel using dynamic port forwarding. For more information, see Option 2, Part 1: Set Up an SSH Tunnel to the Master Node Using Dynamic Port Forwarding.

Note

The following tutorial uses FoxyProxy Standard version 3.0.3 and Chrome version 24.7.0.

To install and configure FoxyProxy in Google Chrome

  1. See https://chrome.google.com/webstore/search/foxy%20proxy and follow the links and instructions to add FoxyProxy to Chrome.

  2. Using a text editor, create a file named foxyproxy-settings.xml containing the following:

    Copy
    <?xml version="1.0" encoding="UTF-8"?> <foxyproxy> <proxies> <proxy name="emr-socks-proxy" id="2322596116" notes="" fromSubscription="false" enabled="true" mode="manual" selectedTabIndex="2" lastresort="false" animatedIcons="true" includeInCycle="true" color="#0055E5" proxyDNS="true" noInternalIPs="false" autoconfMode="pac" clearCacheBeforeUse="false" disableCache="false" clearCookiesBeforeUse="false" rejectCookies="false"> <matches> <match enabled="true" name="*ec2*.amazonaws.com*" pattern="*ec2*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*ec2*.compute*" pattern="*ec2*.compute*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="10.*" pattern="http://10.*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*10*.amazonaws.com*" pattern="*10*.amazonaws.com*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*10*.compute*" pattern="*10*.compute*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false" /> <match enabled="true" name="*.compute.internal*" pattern="*.compute.internal*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false"/> <match enabled="true" name="*.ec2.internal* " pattern="*.ec2.internal*" isRegEx="false" isBlackList="false" isMultiLine="false" caseSensitive="false" fromSubscription="false"/> </matches> <manualconf host="localhost" port="8157" socksversion="5" isSocks="true" username="" password="" domain="" /> </proxy> </proxies> </foxyproxy>

    This file includes the following settings:

    • Port 8157 is the local port number used to establish the SSH tunnel with the master node. This must match the port number you used in PuTTY or terminal.

    • The *ec2*.amazonaws.com* and *10*.amazonaws.com* patterns match the public DNS name of clusters in US regions.

    • The *ec2*.compute* and *10*.compute* patterns match the public DNS name of clusters in all other regions.

    • The 10.* pattern provides access to the JobTracker log files in Hadoop 1.x. Alter this filter if it conflicts with your network access plan.

  3. Choose Customize and Control Google Chrome > Tools > Extensions.

  4. On the Extensions tab, below FoxyProxy Standard, choose Options.

  5. On the FoxyProxy Standard page, choose Import/Export.

  6. On the Import/Export page, choose Choose File, browse to the location of foxyproxy-settings.xml, select the file, and choose Open.

  7. Choose Replace when prompted to overwrite the existing settings.

  8. At the top of the page, for Proxy mode, choose Use proxies based on their predefined patterns and priorities.

  9. To open the web interfaces, in your browser's address bar, type master-public-dns followed by the port number or URL.

    For a complete list of web interfaces on the master node, see View Web Interfaces Hosted on Amazon EMR Clusters.