https://github.com/ryhkml/npm-admin
ALLOW IN or DENY IN - NGINX Proxy Manager Admin Panel
https://github.com/ryhkml/npm-admin
docker nginx nginx-proxy-manager tcp ufw
Last synced: 10 months ago
JSON representation
ALLOW IN or DENY IN - NGINX Proxy Manager Admin Panel
- Host: GitHub
- URL: https://github.com/ryhkml/npm-admin
- Owner: ryhkml
- Created: 2023-06-15T14:31:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-29T09:52:01.000Z (over 2 years ago)
- Last Synced: 2025-01-14T15:52:53.817Z (11 months ago)
- Topics: docker, nginx, nginx-proxy-manager, tcp, ufw
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ALLOW IN or DENY IN - [Nginx Proxy Manager](https://nginxproxymanager.com) Admin Panel
### First of all
You need to fix the Docker and UFW security flaw without disabling iptables. Follow this steps and backup your ufw `after.rules` config
```bash
sudo cp /etc/ufw/after.rules /etc/ufw/after.rules-COPY
```
```bash
sudo curl -s -o /usr/local/bin/ufw-docker https://raw.githubusercontent.com/chaifeng/ufw-docker/master/ufw-docker && \
sudo chmod +x /usr/local/bin/ufw-docker && \
sudo ufw-docker install && \
sudo systemctl restart ufw
```
More information, visit: https://github.com/chaifeng/ufw-docker
### Usage
#### Allow NPM admin panel
Attention, if http and https are listed in the UFW state, delete them. UFW http and https are no longer needed
```bash
sudo ufw allow delete http && \
sudo ufw allow delete https
```
then
```bash
sudo curl -o /usr/local/bin/npm-admin https://raw.githubusercontent.com/ryhkml/npm-admin/main/npm-admin && \
sudo chmod +x /usr/local/bin/npm-admin && \
sudo npm-admin init && \
sudo npm-admin allow
```
or you can specific allow from your subnet/cidr or any
```bash
sudo npm-admin allow
```
Default is your public IP. `any` or `0.0.0.0/0` means, the NPM admin panel can be access from anywhere
#### Delete rule NPM admin panel
```bash
sudo npm-admin delete
```
### How to update
```bash
sudo rm -f /usr/local/bin/npm-admin && \
sudo curl -s -o /usr/local/bin/npm-admin https://raw.githubusercontent.com/ryhkml/npm-admin/main/npm-admin && \
sudo chmod +x /usr/local/bin/npm-admin
```