configuring iptables from remote machine

Discussion in 'Server Operation' started by mmistroni, Feb 23, 2008.

  1. mmistroni

    mmistroni New Member

    hi all,
    i own a VPS, and i'd like to configure iptables as by checking logs i see many intrusion (all failed fortunately) into my server
    i have read quickly docs, they suggest to start to configure it from the machine itself, but unfortunately, having a VPS, i can only access my server via ssh..

    anyone could help me out or point me to a good tutorial?

    thanks and regards
    marco
     
  2. mmistroni

    mmistroni New Member

    Hello,
    i browse the net to find some articles...
    i tried something.... as i noticed that most of attempted intrusion to my VPS come from address starting with 61.143, i have tried to do block those addresses.. will this configuration work?

    ACCEPT tcp -- anywhere anywhere tcp dpt:www
    ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
    DROP tcp -- 61.143.0.0 anywhere

    will this block all intrusion from that address?

    problem i have is that i connect remotely from a machine which does not have a static ip.... therefore i cannot do sort of 'block everything except from access from my machine' ...

    any suggestions appreciated

    thanks and regards
    marco
     
  3. edge

    edge Active Member Moderator

    Just make sure that you know exactly what you are doing, or you might lock yourself out!

    When I did add my IPtables, I added a cronjob to reboot the server at a set time without loading the IPtables (this so if I did lock myself out I got access again).

    When I was done with adding the IPtables, and all was still okay, I removed the cronjob.
     

Share This Page