LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Closed Thread
  Search this Thread
Old 01-10-2005, 07:30 PM   #1
iclinux
Member
 
Registered: Dec 2004
Posts: 69

Rep: Reputation: 15
How to block a port, such as 21?


Hi threre,

I wan to write a program that can block a port, such as 21.

But I don't konw how to do it.

Thanks a lot

Last edited by iclinux; 01-10-2005 at 07:44 PM.
 
Old 01-10-2005, 07:33 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Silly question, but why not just stop the services,
or use iptables?


Cheers,
Tink
 
Old 01-10-2005, 07:52 PM   #3
iclinux
Member
 
Registered: Dec 2004
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks, Tinkster.

What I mean is that: after I block the specified ports, all subsequent processes can not use these ports, but I don't want to kill these process.

BTW, how to write a program with Iptables? thanks again.
 
Old 01-16-2005, 12:51 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...hreadid=275989
 
  


Closed Thread



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
port block of blaster alvi2 Linux - Networking 3 08-31-2005 05:07 PM
telnet port block hfawzy Linux - Security 4 08-24-2005 06:52 PM
Getting through a port block basketkase999 Linux - Networking 3 12-16-2004 02:58 PM
block telnet to port 80 neil Linux - Security 4 07-01-2004 06:23 AM
How to tell if my ISP block port 25? jme Linux - Networking 9 05-30-2004 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:33 AM.

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