Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-22-2015, 07:06 AM   #1
LQ Newbie
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
Wink How do you block ports

How do you block ports
Old 11-22-2015, 07:30 AM   #2
Senior Member
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,040

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
It depends...

Under what conditions, or for what purpose?

Why? What is your situation or issue that you want to block a port?

Please say this is not homework.
Old 11-22-2015, 02:51 PM   #3
Registered: Apr 2013
Location: S.E. England
Distribution: Arch
Posts: 161

Rep: Reputation: Disabled
Use your firewall

See title
Old 11-22-2015, 05:49 PM   #4
Senior Member
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,445

Rep: Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902Reputation: 902
Originally Posted by COFFEE BOY View Post
How do you block ports
With a little more information about your problem, we would be able to give a more precise answer. Here is what I can say:

Some newer distro use a command-line tool named firewall-cmd.
Most distros have a tool names iptables.
Distros with a GUI often have a GUI tool for firewall configuration.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to block all ports and then selectively enable ports? Key-authentication 22 greenace92 Linux - Server 2 11-11-2015 09:09 AM
Need to block all ports and open only select ports on Ubuntu 7.1 Mr.J Linux - Networking 1 11-18-2008 02:45 AM
how to block torrent ports? LinuxNewbie999 Linux - Networking 1 09-04-2007 08:30 AM
Ports to Block chrisfirestar Linux - General 1 10-28-2003 03:27 AM
how to block ports furquan Linux - Security 9 02-21-2002 06:23 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration