Disable Firewall with PHPMyAdmin?

Discussion in 'General' started by sabrewing, Jun 3, 2014.

  1. sabrewing

    sabrewing New Member

    HELP: Disable Firewall with PHPMyAdmin

    Hi!
    I was not paying much attention while turning on firefall, and as a result now I do not have access to SSH and ISPConfig control panel.
    I have still access to PHPMyAdmin via 8081 port.

    I have changed firewall record in MySQL, but changes are not applied.

    Please give me an advice on how to force ISPConfig to apply changes via MySQL or any other method to restore access.

    Thank you!
     
    Last edited: Jun 4, 2014
  2. srijan

    srijan New Member HowtoForge Supporter

    Which tutorial you have used?
    Which distribution you have installed ISPConfig
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    manual changes in the firewall mysql database table will not result in a config change as they are no valid configuration transaction. Do you still have access to ssh? If not, we will have to try to emulate a config transaction in sys_datalog.
     
  4. sabrewing

    sabrewing New Member

  5. sabrewing

    sabrewing New Member

    I have these ports open:
    TCP 20,21,22,25,53,80,110,143,443,993,995,3306,8080,8081,10000,11
    UDP 53,3306,11194

    But no access to FTP, SSH and ISPConfig Control panel as their ports are reassigned.

    Can you please explain more about emulation of transactions in sys_datalog, as my tries haven't succeded.
     
  6. sabrewing

    sabrewing New Member

    I have solved the problem.
    As firewall by default doesn't control ipv6, I have connected to SSH via ipv6.
     
  7. Apryaldy

    Apryaldy New Member

    I am sorry for bringing this topic live again
    somehow i was in this situation, and currently have no access both to terminal and firewall.
    could you assist me on how to try to emulate a config transaction in sys_datalog?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Can you not access that host from console?
    Or do what @sabrewing did and use IPv6.
     
  9. Jesse Norell

    Jesse Norell Well-Known Member

    And an additional question, do you have remote MySQL access to the control panel server, including valid login credentials? If not, you can't add anything to sys_datalog.
     
  10. Apryaldy

    Apryaldy New Member

    Nope, i can't.

    i do have an access to phpmyadmin with root account though.

    this has been solved by inserting data to `sys_datalog` with parameter remove existing firewall settings.
    to doing this, one need an access to ispconfigs table like @till mentioned.

    Thank you for your reply.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Try this sql statement:

    Code:
    INSERT INTO `sys_datalog` (`server_id`, `dbtable`, `dbidx`, `action`, `tstamp`, `user`, `data`, `status`, `error`) VALUES(1, 'firewall', 'firewall_id:1', 'd', 1544797444, 'admin', 'a:2:{s:3:\"old\";a:10:{s:11:\"firewall_id\";s:1:\"1\";s:10:\"sys_userid\";s:1:\"1\";s:11:\"sys_groupid\";s:1:\"1\";s:13:\"sys_perm_user\";s:4:\"riud\";s:14:\"sys_perm_group\";s:4:\"riud\";s:14:\"sys_perm_other\";s:0:\"\";s:9:\"server_id\";s:1:\"1\";s:8:\"tcp_port\";s:62:\"20,21,22,25,53,80,110,143,443,587,993,995,3306,8080,8081,10000\";s:8:\"udp_port\";s:7:\"53,3306\";s:6:\"active\";s:1:\"y\";}s:3:\"new\";a:10:{s:11:\"firewall_id\";N;s:10:\"sys_userid\";N;s:11:\"sys_groupid\";N;s:13:\"sys_perm_user\";N;s:14:\"sys_perm_group\";N;s:14:\"sys_perm_other\";s:0:\"\";s:9:\"server_id\";N;s:8:\"tcp_port\";N;s:8:\"udp_port\";N;s:6:\"active\";N;}}', 'ok', NULL);
    
    it disables the firewall with ID 1 on server 1
     

Share This Page