Solved

blocking some port from a particular IP

Posted on 2003-11-24
2
472 Views
Last Modified: 2012-05-04
i wish to block some port  only from a particular IP. using IP tables. ie., I wish to block my Lan users ( only particular Lan Users) reaching particular port for a particular IP.

Say if a external IP ( in internet ) listening to ports 5000,80,8001. I wish to block my Lan users only to block 5000 port only to this IP. So that he can reach other IP listening to port 5000.

How can i do that?

0
Comment
Question by:hithayath
2 Comments
 
LVL 7

Expert Comment

by:philby11
ID: 9816416
try TCP/IP filtering if you are on an NT (2k,xp) system.
From the properties of your LAN go toTCP/IP properties - advanced - options - tcp/ip filtering - properties.
Here you can select the allowed ports

0
 

Accepted Solution

by:
tieums earned 50 total points
ID: 9816788
Hi hithayath,

Using IPTables it is possible to block particular internal IP to reach particular ports on a particular internet IP.

Before defining the props of your forward chain, run this command or add the details on top of the forward chain
in your iptables config file:

example: I don't want 172.16.1.5 to access 217.128.123.4 port 5000

iptables -A FORWARD -p TCP -s 172.16.1.5 -d 217.128.123.4 --dport 5000 -j REJECT

It is important to use REJECT instead of DROP, when restricting access from inside, this way blocked TCP connections
attempts are not waiting for timeout.

Hope this helps,
Tieums.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
local DNS vendor. 4 67
Public Printing Options 3 49
Admin Certificates in my browser 2 32
Exchange2013 MAPI 6 17
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
February 24, 2017 — On February 23, Travis Ormandy, a vulnerability researcher at Google, reported on Twitter (https://twitter.com/taviso/status/834900838837411840) that massive stores of data have been leaked by CloudFlare, a company that provide…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question