{"id":25348576,"url":"https://github.com/markhershey/nps-install","last_synced_at":"2025-04-08T19:55:17.177Z","repository":{"id":113094970,"uuid":"604202857","full_name":"MarkHershey/nps-install","owner":"MarkHershey","description":"ehang-io / nps Install Scripts","archived":false,"fork":false,"pushed_at":"2023-03-21T18:08:40.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T15:48:06.959Z","etag":null,"topics":["nps","server","tcp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkHershey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T14:53:48.000Z","updated_at":"2023-03-09T13:29:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"9bcba683-44e8-4f41-b5fc-d43c52c5dc8e","html_url":"https://github.com/MarkHershey/nps-install","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkHershey%2Fnps-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkHershey%2Fnps-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkHershey%2Fnps-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkHershey%2Fnps-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkHershey","download_url":"https://codeload.github.com/MarkHershey/nps-install/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918930,"owners_count":21018044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nps","server","tcp"],"created_at":"2025-02-14T15:39:10.400Z","updated_at":"2025-04-08T19:55:17.166Z","avatar_url":"https://github.com/MarkHershey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nps-install\n\nConvenient install scripts for [`ehang-io / nps`](https://github.com/ehang-io/nps), an intranet penetration proxy server.\n\n## Step 1: Setup NPS Server\n\nDownload and install the nps server at a virtual machine with a fixed IP address.\n\n-   default web interface will be served at port `8080`.\n-   default client connection port at server side is `8024`.\n\n## Step 2: Setup Clients\n\n### 2.1: Create client entry in server configuration\n\n-   Create a new `client` on the web interface. Just fill in the `remarks` input box should be suffice. `vkey` will be automatically generated.\n-   Note down the generated `vkey` for the next step.\n\n### 2.2: Install client on client machine\n\nAt this point, you should have your server running with a fixed `ip` address and a `port` number, and obtained a new `vkey` for this new client machine.\n\nRun the following command to install the nps client on the client machine\n\n```bash\npython3 client_install.py --server SERVER_IP_ADDRESS --port SERVER_PORT --vkey CLIENT_VKEY\n```\n\n-   `--server` and `--vkey` arguments are always required.\n-   `--port` is optional and default to `8024` if not specified.\n\nSuccessful installation will be reflected on the web interface as a new online client.\n\nIf not, check if the port for connection client and server (`8024`) at the server side is open for traffic.\n\n```bash\nsudo ufw allow 8024\nsudo ufw show added\nsudo ufw enable\n```\n\n### 2.3 Setup penetration service\n\nAt this step, the port numbers may be slightly confusing, so take a breath. For example, we want to expose a client's SSH service to the public network. We have the following steps:\n\n1. Make sure the SSH service is up and running in the client machine. The default port for `ssh` is `22`, but you may specify it to be otherwise.\n2. For SSH service, we will use a TCP connection between the client machine and the nps server. Hence, we go to the web interface of nps, under `TCP` tab, we click the `+Add` button.\n    - `Client ID` can be found in the `client` tab, it is an auto-generated integer.\n    - `Server Port` will be a new unoccupied port on the server that you intent to allocate it to this client's service.\n    - `Target (IP:Port)` will be the address of the client service at the client's subnet. For example, for default ssh service, it will be at `localhost:22`.\n    - click `Add` button to save.\n3. Important: Make sure that on the server machine, firewall is configured appropriately to allow two-way traffic on the new `Server Port` mentioned above.\n4. Once all is done, test the connection at `AAAAAAA:BBBB` where `AAAAAAA` is the ip address of the nps server and `BBBB` is the `Server Port` specified above.\n\nCongrats, that's all.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhershey%2Fnps-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkhershey%2Fnps-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhershey%2Fnps-install/lists"}