Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Close all ports except 21 22 and 28960...
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Close all ports except 21 22 and 28960...

BlazeMuisBlazeMuis Member
edited September 2012 in General

Good evening..

I have a small question, i want to close all ports except 21 22 28960 and 9987
How can i do that?

Comments

  • With IPTables.

  • rskrsk Member, Patron Provider

    @joodle

    Is this on a vps? if so xen or openvz?

    Regards

  • @joodle WHAT ARE YOU PLANNING? All these questions.. what's it leading up to eh?

  • @AsadHaider said: @joodle WHAT ARE YOU PLANNING? All these questions.. what's it leading up to eh?

    Don't worry, i don't think he's going to start a hosting service or so :D

    Port 28960 is CoD 4 so he probably just wants to protect his CoD server.

  • @rsk openvz
    @AsadHaider i keep getting dos attacks from like 6-8 mb/s and i want to close all ports now except the ones i need to use

  • rskrsk Member, Patron Provider

    @joodle

    speak to your host for openvz, unless if they actually allow you to control your own iptables from within your VPS.

    Regards

  • AsadAsad Member
    edited September 2012

    @joodle That sucks. Just keep the dubstep coming..

  • @AsadHaider said: @joodle That sucks. Just keep the dubstep coming..

    Dubstep radio is on an other vps :P

  • GarrettGarrett Member
    edited September 2012

    If you have iptables, you could something like

    iptables -N WHITELIST
    iptables -A INPUT -j WHITELIST
    iptables -A WHITELIST -p tcp -m tcp --dport 21 -j ACCEPT
    iptables -A WHITELIST -p tcp -m tcp --dport 22 -j ACCEPT
    iptables -A WHITELIST -p tcp -m tcp --dport 28960 -j ACCEPT
    iptables -A WHITELIST -p tcp -m tcp --dport 9987 -j ACCEPT
    iptables -P INPUT DROP

  • Easier using csf.

  • @garrett thanks, tried that
    i hope that helps...

  • @joodle said: i keep getting dos attacks from like 6-8 mb/s and i want to close all ports now except the ones i need to use

    Running SSH on default port? Tsk, tsk...

Sign In or Register to comment.