-----Original Message----- >From: [EMAIL PROTECTED] >Sent: Aug 4, 2007 6:49 AM >To: beginners@perl.org >Subject: automatically open ports > >Im not sure where to post this as Im really looking for the >functionality not specifically that it have to be in the perl >language. > >How would I make something that would automatically open the correct >ports for a certain machine without my having to be at the machine >goto 192.168.1.1 in a browser and open the ports manually? Can this be >done easily? >
I don't know what's your intent for this.Do you mean when there's a connection to this host,it should open a port to accept the connection,at other time it shouldn't open that port?AFAIK,this is impossible.Though using some tools like PF port forwarding or LVS,you can't see the ports opened on a host but they are really on there,it's nothing you wanted here. Instead you can always open a port on the host and accept the connection,but use firewall (like iptables) to filter the info you wanted and drop the info you unwanted. Opening a port generally need to build a socket server.In perl it's easy to do,see 'perldoc IO::Socket' for the description. -- Jeff Pang <[EMAIL PROTECTED]> http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/