Skip to Content

How to disable IP restriction for a gateway ssh user of Ezeelogin ?

Error: This IP is not permitted. Please add this IP in the Allowed IPs field for this user


Overview: This article explains how to disable IP restriction for a gateway SSH user in Ezeelogin by executing a command on the server or through the MySQL database, including detailed steps for both methods.


                                                ipna

Step 1. To disable IP restriction for a gateway ssh user of Ezeelogin you can execute the following in the Ezeelogin server.

root@jumpserver:~#/usr/local/ezlogin/ez_queryrunner.php "UPDATE prefix_users SET ip_enable='N', status=1 WHERE username='myuser'"

You can replace 'myuser' as your Ezeelogin user name.

Step 2. To disable IP restriction for a gateway ssh user of Ezeelogin from the database you can follow the steps:-

Step 2.1. Find database name and database prefix from /usr/local/etc/ezlogin/ez.conf in ezeelogin gateway server.

root@jumpservercat /usr/local/etc/ezlogin/ez.conf
cver 2
system_folder /var/www/ezlogin/
www_folder /var/www/html/ezlogin/
uri_path /ezlogin/
force_https yes
db_host localhost
db_port /var/lib/mysql/mysql.sock
db_name ezlogin_jymcef
db_user ezlogin_sztb
db_pass cN2CSZ8Kdl+HuGboX2/7n8mjfdCVGaxY1N68ZZzdBbulvI2Cvf22ibFihuASKLlF3sk4Bk9aNHpSTYfnlr9ZpVpcvbrqr3dZSzfNYWZyD9M=
db_prefix eltq_
cookie_encryption_key mHwj+qaUWJHyeBX6IHbfgP+wAeIK9FDMa8b54EyccXBR/shqJ9/56dxMqWVunD5ScnP4QBiLnrMEc2eMKp75Gc6WMDwM1jL8vo9OI++GlVQ=
cookie_name ssuats
cookie_path /ezlogin/
admin_user admin
mysql_encrypt no
log_level trace

Step 2.2. Login to MySQL command prompt.

Note: Replace the "db_user" &  "dn_name" with values in  /usr/local/etc/ezlogin/ez.conf of your ezeelogin jump server

root@jumpserver:~# mysql -u db_user -p db_name

Step 3. Run the following command to disable IP restriction for a gateway ssh user of Ezeelogin.

Note: You have to use the correct db_name and dbprefix_  from ez.conf if you are running the MySQL commands manually.

UPDATE prefix_users SET ip_enable='N', status=1 WHERE username='myuser';

Note: Replace "dbprefix_  " with the value of dbprefix_ in  /usr/local/etc/ezlogin/ez.conf of your Ezeelogin jump server. For example "dbprefix_users" is to be replaced with " eltq_users" here.


Related Articles

How can i restrict IP’s to access the ezeelogin portal?

unable to ssh because ip not allowed because none of user’s groups are listed in AllowGroups