Networking Forums

Networking Forums > Computer Networking > Linux Networking > Preventing bind on certain ip address

Reply
Thread Tools Display Modes

Preventing bind on certain ip address

 
 
Ernie Sams
Guest
Posts: n/a

 
      01-20-2004, 04:45 AM
On Tue, 20 Jan 2004 10:43:04 -0500, Rajsekar Manokaran wrote:

>
> I want to prevent users from binding to any port on my machine,
> specifically, I want to allow bind on localhost but not on the eth0
> interface.
>
> I know that binding to port below 1024 is not allowed by default. How
> do I make it to all the ports?


Really bad idea. UDP connections break badly, so you can't do DNS
lookups, for example. Your best option is to use a firewall,
unfortunately, if your goal is to prevent any application from creating a
LISTENING socket.

The good news is that you don't need a huge number of rules:

IPTABLES -A INPUT -i eth0 -p tcp --syn -m state --state NEW -j REJECT

Now, if you have some services you want to expose to the outside world,
you would have to add rules above this one to enable access to them.
Not a big deal.

EAS


 
Reply With Quote
 
 
 
 
Rajsekar Manokaran
Guest
Posts: n/a

 
      01-20-2004, 02:43 PM

I want to prevent users from binding to any port on my machine,
specifically, I want to allow bind on localhost but not on the eth0
interface.

I know that binding to port below 1024 is not allowed by default. How
do I make it to all the ports?

I know that an alternative is to allow bind and installing a firewall
to allow no incoming packets, but I do not want to use a firewall

Please help

thanx
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Bind to port 22 on 0.0.0.0 failed: Address already in use Pascal Hambourg Linux Networking 2 03-01-2010 12:00 PM
bind application to ip address (eg browsers) icarus.zero@googlemail.com Linux Networking 0 05-08-2006 04:24 PM
address bind... Ming-Chuan Huang Linux Networking 1 03-22-2006 01:53 PM
bind wwwoffle to IP address Matthias Medger Linux Networking 1 05-09-2004 12:42 PM
Cannot bind name to socket! : Address already in use Ravi Linux Networking 1 12-01-2003 04:52 PM



1 2 3 4 5 6 7 8 9 10 11