Manage access to ADM from command line

Got a question about our NAS utilities? The answer lies within.

Moderator: Lillian.W@AST

Post Reply
karpovigorok
Posts: 2
youtube meble na wymiar Warszawa
Joined: Mon Mar 14, 2022 8:25 pm

Manage access to ADM from command line

Post by karpovigorok »

I have restricted access to the ADM Web interface by IP.

Now I don't have access to my usual location and can't login in ADM, but I can login by ssh.

My question, what I need to do to allow access from my current location?

What I found:
/volume0/usr/builtin/etc/ipblock
drwxr-xr-x 2 root root 4096 Jul 23 2021 ./
drwxr-xr-x 51 root root 4096 Mar 12 06:33 ../
-rw-r--r-- 1 root root 25 Jun 13 2020 defender.black
-rw-r--r-- 1 root root 27 Mar 14 14:16 defender.conf
-rw-r--r-- 1 root root 147 Mar 14 13:38 defender.safe
-rw-r--r-- 1 root root 49 Mar 14 13:46 defender.white
-rw-r--r-- 1 root root 87 Jun 13 2020 ipblock.conf
-rw-r--r-- 1 root root 135467 Oct 14 18:41 ipblock.deny

I tried to change the configs, but it did not give the desired effect.
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Manage access to ADM from command line

Post by Nazar78 »

You'll need to reload the settings after making changes to it (not sure which you did), simply restart the NAS.

Or, if you're verse in iptables, review them, look for your rule then remove them. Don't forget to remove it from ADM once you have access, no reboot needed.

Code: Select all

root@Nimbustor4:~# iptables --line-numbers -L INPUT
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
2    ACCEPT     all  --  localhost            anywhere
3    DROP       all  --  192.168.1.202        anywhere
4    ACCEPT     all  --  anywhere             anywhere
root@Nimbustor4:~# iptables -D INPUT 3
root@Nimbustor4:~# iptables --line-numbers -L INPUT
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
2    ACCEPT     all  --  localhost            anywhere
3    ACCEPT     all  --  anywhere             anywhere
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
karpovigorok
Posts: 2
Joined: Mon Mar 14, 2022 8:25 pm

Re: Manage access to ADM from command line

Post by karpovigorok »

Thank you for your answer.

I have solved the problem using NGINX proxy, added in config something like this

Code: Select all

server {
        listen 443;
        server_name income-point.com;
        location / {
            proxy_pass https://192.168.100.96:8001;
            proxy_redirect     off;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        }
}
Nazar78 wrote:You'll need to reload the settings after making changes to it (not sure which you did), simply restart the NAS.

Or, if you're verse in iptables, review them, look for your rule then remove them. Don't forget to remove it from ADM once you have access, no reboot needed.

Code: Select all

root@Nimbustor4:~# iptables --line-numbers -L INPUT
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
2    ACCEPT     all  --  localhost            anywhere
3    DROP       all  --  192.168.1.202        anywhere
4    ACCEPT     all  --  anywhere             anywhere
root@Nimbustor4:~# iptables -D INPUT 3
root@Nimbustor4:~# iptables --line-numbers -L INPUT
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
2    ACCEPT     all  --  localhost            anywhere
3    ACCEPT     all  --  anywhere             anywhere
Post Reply

Return to “NAS Utilities”