-
Notifications
You must be signed in to change notification settings - Fork 41
Add internet access page #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bb0c2f6
Add internet access page
msimberg 942d292
Address review comments and add notes about public IPs being a shared…
msimberg 1f9a772
Give ssh config a title and use plain text lexer
msimberg e537097
Add export to proxy environment variables for easier copy-pasting
msimberg fd29d20
Make git cloning without ssh config a warning instead of error
msimberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| [](){#ref-guides-internet-access} | ||
| # Internet Access on Alps | ||
|
|
||
| The [Alps network][ref-alps-hsn] is mostly configured with private IP addresses (`172.28.0.0/16`). | ||
| Login nodes have public IP addresses which means that they can directly access the internet, while a proxy server provides internet access for compute nodes. | ||
|
|
||
| ??? info "Compute node proxy configuration" | ||
|
|
||
| Compute nodes are configured with the following environment variables to use the proxy server: | ||
|
|
||
| ```bash | ||
bcumming marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| https_proxy=http://proxy.cscs.ch:8080 | ||
| http_proxy=http://proxy.cscs.ch:8080 | ||
| no_proxy=.local, .cscs.ch, localhost, 148.187.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | ||
| HTTPS_PROXY=http://proxy.cscs.ch:8080 | ||
| HTTP_PROXY=http://proxy.cscs.ch:8080 | ||
| NO_PROXY=.local, .cscs.ch, localhost, 148.187.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | ||
| ``` | ||
|
|
||
| !!! warning "Public IPs are a shared resource" | ||
| Be aware that public IPs, whether on login nodes or through the proxy, are essentially a shared resource. | ||
| Many services will rate limit or block usage based on the IP address if abused. | ||
| An example is pulling container images from Docker Hub. | ||
| [Authenticating with Docker Hub][ref-ce-third-party-private-registries] makes their rate limit apply per user instead. | ||
|
|
||
| ## Using SSH through the proxy server | ||
|
|
||
| While use of the proxy server is transparent for most use cases, others need additional configuration for compute nodes. | ||
| An example is cloning git repositories from GitHub over SSH. | ||
| Cloning over https works without additional configuration. | ||
| To make SSH use the proxy server, add the following to your `~/.ssh/config` file: | ||
|
|
||
| ```bash | ||
bcumming marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Match Host *,!148.187.0.0/16,!192.168.0.0/16,!172.16.0.0/12,!10.0.0.0/8 exec "hostname -I | grep -vqF 148.187." | ||
| ProxyCommand nc -X connect -x proxy.cscs.ch:8080 %h %p | ||
| ``` | ||
|
|
||
| This configuration takes into account that login and compute nodes require a different setup. | ||
|
|
||
| ??? info "Error message when cloning without the proxy set up for SSH" | ||
bcumming marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| When cloning a git repository without the correct SSH configuration, cloning will time out as follows: | ||
| ```bash | ||
| [daint][<user>@daint-ln001 ~]$ git clone [email protected]:open-mpi/ompi.git | ||
| Cloning into 'ompi'... | ||
| ssh: connect to host github.com port 22: Connection timed out | ||
| fatal: Could not read from remote repository. | ||
|
|
||
| Please make sure you have the correct access rights | ||
| and the repository exists. | ||
| ``` | ||
|
|
||
| ## Accessing the public IP of a node | ||
|
|
||
| When on a login node configured with a public IP address, you can retrieve the public IP address for example as follows: | ||
RMeli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| [daint][<user>@daint-ln001 ~]$ curl api.ipify.org | ||
| 148.187.6.19 | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.