Setting up a firewall remotely

Discussion in 'Server Operation' started by PatrickAdrichem, Jul 6, 2008.

  1. PatrickAdrichem

    PatrickAdrichem New Member

    I've currently got a remote dedicated server,
    and still need to configure the firewall of it.

    Now i'm a bit affraid of it because, if i install a firewall and it will activate instantly, i will not be able to access it myself anymore, since its a rental.
    and to get them to open it up again...

    well i found the command system-config-firewall
    and it has SSH options, but how can i be sure its my SSH, thats listed in there? I've changed my SSH port to somewhere in the far 8000's
    so its no longer on the default port 22.
    plus i've locked it to a specific IP adress. and no root access.

    Is there any tutorial / guide to safely set up a firewall without banning yourself.

    My biggest problem is that i have a dynamic IP adress :(
  2. chipsafts

    chipsafts New Member

  3. goldenfox

    goldenfox New Member

    Let say, you have set your SSH port to 8000, open your system-config-firewall and go to customize.

    In the "other port" textbox just put 8000:tcp to allow connection to port 8000.

    If you want to open other ports not found in the predefined menus, just append it to the Other ports textbox. If for example you want to add NTP port 123 you'll have to append and it will look like this,

    8000:tcp 123:tcp

    Last edited: Jul 7, 2008
  4. edge

    edge Active Member Moderator

    You could setup a cron job to restart the server at a set time without the firewall (just in case you lock yourself out).
    If you get the firewall to work before the set time, you can remove the cron job.
  5. Hans

    Hans Moderator ISPConfig Developer

    If you use ISPConfig you can't close port 22 to avoid that you can't access your server anymore.

Share This Page