ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Close ports on Linode Debian

    IT Discussion
    debian 9 firewall
    4
    5
    616
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • WLS-ITGuyW
      WLS-ITGuy
      last edited by

      Hello all,

      I have been trying to figure out what firewall I have on our Debian host but cannot. I did a port scan and found that we have some ports open that I want to close as I know we don't use any of them.

      1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch
        last edited by JaredBusch

        Use UFW

        apt-get install -y ufw
        

        Then open only what you need to use. Here are examples.

        ufw enable
        ufw allow in ssh
        ufw allow in http
        ufw allow in https
        ufw allow in 10000:20000/udp
        
        1 Reply Last reply Reply Quote 3
        • JaredBuschJ
          JaredBusch
          last edited by

          FYI, this writes to iptables for you as far as I know.

          1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller
            last edited by

            Beyond using a firewall, you can also set whatever ports to simply not be open. Firewalls block ports, but leave them open. You can close them additionally. Your best defense is doing both.

            1 Reply Last reply Reply Quote 0
            • 1
              1337
              last edited by 1337

              By default Debian comes with iptables. It will allowing everything but a normal Debian install have no services running.

              Run iptables -L to see the firewall rules.

              On Debian 10 the default is nftables.

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              • First post
                Last post