[TAG] More spam than content?

Jimmy O'Regan jimregan at o2.ie
Wed Aug 11 23:45:37 MSD 2004


Ben Okopnik wrote:

>On Wed, Aug 11, 2004 at 07:52:33PM +0100, Jimmy O'Regan wrote:
>  
>
>>Ben Okopnik wrote:
>>
>>    
>>
>>>Update: I *think* I've got the general idea of how to do this -
>>>
>>>su -c 'ssh -l ben -L 25:linuxgazette.net:25'
>>>
>>>now gives me a "Hi from genetikayos.com" when I do a "telnet localhost 25".
>>>However, I'm a little fuzzy on how to test it, given that I _am_ at work
>>>right now (my students are doing a half-hour-long exercise, so I've got a
>>>little time to play.) I'll probably find out if it works tonight, from my
>>>brother's place. If it does, it'll make a nice 2-cent tip.
>>> 
>>>
>>>      
>>>
>>That got me started... I'm looking at different ways of running Linux 
>>under Windows at the moment, and tried to forward HTTP to CoLinux (User 
>>Mode Linux ported to the NT kernel) but it's not working:
>>
>>(from Cygwin)
>>$ ssh -N -f -l jimmy -L 80:192.168.0.40:80 192.168.0.40
>>
>>$ telnet localhost 80
>>Trying 127.0.0.1...
>>channel 1: open failed: administratively prohibited: open failed
>>Connected to PC.
>>Escape character is '^]'.
>>Connection closed by foreign host.
>>
>>Grr. I have
>>AllowTcpForwarding yes
>>in /etc/ssh/sshd_config and don't have no-port-forwarding in 
>>~/.ssh.authorized_keys. Any ideas?
>>    
>>
>
>Yep. You're trying to forward a low port, which requires root access.
>"administratively prohibited" seems to hint at that being the case.
>  
>
No, using port 8000 does the same - this is Windows at the client end, 
where every user is the superuser. Doing the same thing using 
genetikayos.com works just fine. I thought it might that Apache is 
refusing the connection, but it doesn't seem to be that either.

While messing around with the ServerName and ServerAlias stuff, I 
noticed that it accepts wildcards: I always wondered how those 
name.of-person.to-be-insulted.com sites worked.

In httpd.conf:
<VirtualHost 192.168.0.40>
        DocumentRoot /var/www
        ServerAlias *.hostname.com
        DirectoryIndex test.php
</VirtualHost>

test.php:

<html>
<head>
<title>Test</title>

<body>
<p>
<?php
$sname = getenv (SERVER_NAME);
$pname = basename ($sname, ".hostname.com");
$a = array();
$a = split ("\.", $pname);
foreach ($a as $e)
{
        print ucfirst ($e) . ' ';
}
?> was here.</p>
</body>
</html>







More information about the TAG mailing list