Re: IP Filtering Patch

dean blackketter <[email protected]> Thu, 20 Feb 2003 11:04:13 -0800
Newsgroups gmane.music.equipment.slimp3.dev
Message-ID <[email protected]>
Hi,

This isn't working under OSX.  I'm getting a failure on gethost() using  
the value returned by hostname(), which in my case is 'firebook'.

It could be a problem with my particular configuration (I have a host  
name, but no DNS entry for my statically assigned address).

I rewrote SliMP3::HTTP::init() thusly so it doesn't fail, but it still  
only gives me 127.0.0.1 in the list.  Thoughts?

sub init {
	@hostaddr = ();
	my @hostnames;
	push @hostnames, 'localhost';
	push @hostnames, hostname();
	
	foreach my $hostname (@hostnames) {
		my $host = gethost($hostname);
		if (!$host) { next; };
		if ( @{$host->addr_list} > 1 )
		{
			my $i;
			for my $addr ( @{$host->addr_list} ) {
				push @hostaddr, inet_ntoa($addr);
			}
		} else {
			push @hostaddr, inet_ntoa($host->addr);
		}
	}
	$::d_http && msg("Local IP addresses: " . (join ' ', @hostaddr) .  
"\n");
	
	idle();
}	


On Thursday, February 20, 2003, at 09:48  AM, Metzger, Michael wrote:

> Ok, this patch applies to CVS as of this morning (02/20/03) and  
> implements
> the following:
>
> - Option to allow/disallow local IP addresses to connect (127.0.0.1,  
> any
> local IP, etc) (enabled by default)
> - Removal of 127.0.0.1 from always being listed in allowed IPs
> - Text cleanup based on new option
>
> Mike
>
>
>
> -----Original Message-----
> From: Metzger, Michael [mailto:[email protected]]
> Sent: Thursday, February 20, 2003 11:14 AM
> To: '[email protected]'
> Subject: RE: [slimp3-dev] IP Filtering Patch
>
>
> Working on it as we speak.  To suit everyone, I've added an additional
> option of "Allow Local IPs" to either implicitly allow every IP  
> aliased on
> the system, or block them.  If you block them, you can still explicitly
> define certain sources.
>
> Should hopefully have something soon, but my job keeps getting in the  
> way...
> ;)
>
> Mike
>
> -----Original Message-----
> From: dean blackketter [mailto:[email protected]]
> Sent: Thursday, February 20, 2003 11:12 AM
> To: [email protected]
> Subject: Re: [slimp3-dev] IP Filtering Patch
>
>
> Fair enough.
>
> By default the local machine addresses should be allowed.
>
> The current CVS tree always adds 127.0.0.1, even if you delete it AND
> blocks connections from the local machine even if 127.0.0.1 is allowed
> (as they appear to come in on the adaptor's address.)
>
> Patches, anyone?
>
> -dean
>
> On Thursday, February 20, 2003, at 07:28  AM, Karl Auer wrote:
>
>> On Thu, 20 Feb 2003 07:53:22 -0800
>> dean blackketter <[email protected]> wrote:
>>> I think that the local host (and all it's aliases) should always be
>>> allowed and shouldn't even appear.
>>
>> Heavens, no! On a Unix machine, who's to say all the users are  
>> trusted?
>>
>> Please leave this settable, or at least only open in conjunction with
>> active password protection.
>>
>> Regards, K.
>>
>> --
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
>> ~
>> Karl Auer (kauer-Va/[email protected])                   +41-43-2660706 (h)
>> http://www.biplane.com.au/~kauer/                  +41- 1-6327531 (w)
>>
>> ------------------------ Yahoo! Groups Sponsor
>> ---------------------~-->
>> Get 128 Bit SSL Encryption!
>> http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/rIp0lB/TM
>> ---------------------------------------------------------------------
>> ~->
>>
>> To unsubscribe from this group, send an email to:
>> [email protected]
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>> http://docs.yahoo.com/info/terms/
>>
>>
>
>
>
> To unsubscribe from this group, send an email to:
> [email protected]
>
>
>
> Your use of Yahoo! Groups is subject to  
> http://docs.yahoo.com/info/terms/
>
>
>
> To unsubscribe from this group, send an email to:
> [email protected]
>
>
>
> Your use of Yahoo! Groups is subject to  
> http://docs.yahoo.com/info/terms/
>
>
>
> ------------------------ Yahoo! Groups Sponsor  
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/rIp0lB/TM
> --------------------------------------------------------------------- 
> ~->
>
> To unsubscribe from this group, send an email to:
> [email protected]
>
>
>
> Your use of Yahoo! Groups is subject to  
> http://docs.yahoo.com/info/terms/
>
> <ipfilter-022003.diff>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/