Jump to content
Sign in to follow this  
CyberAssassin

Ports

Recommended Posts

I'm working on making a server package similar to xampp, and I need to open ports, without having to tell them how to do it, Im gonna offer a option that opens the ports for them. Does anyone know how to open ports?(and what I mean is, do you know how to open ports with autoit)

Edited by CyberAssassin

Share this post


Link to post
Share on other sites

Hi.

I'm working on making a server package similar to xampp, and I need to open ports, without having to tell them how to do it, Im gonna offer a option that opens the ports for them. Does anyone know how to open ports?(and what I mean is, do you know how to open ports with autoit)

I assume, your question is about how to put in a firewall exception to allow INbound traffic for a certain TCP port?

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Hi.

I assume, your question is about how to put in a firewall exception to allow INbound traffic for a certain TCP port?

Regards, Rudi.

Yes, sorry I should have been more descriptive.

Share this post


Link to post
Share on other sites

You still haven't told us which firewall yo are refering to, WindowsXP/Vista or an external one??

If it's an external one you use UPnP

Share this post


Link to post
Share on other sites

@all

MAybe this can get you going.

;Enable Port
Dim $objPort

$objPort = ObjCreate("HNetCfg.FwOpenPort")

$objPort.Name = "DCOM"
$objPort.Port = 888
$objPort.Scope = "NET_FW_SCOPE_LOCAL_SUBNET"
$objPort.Protocol = "NET_FW_IP_PROTOCOL_TCP"
$objPort.Enabled = True

$objProfile.GloballyOpenPorts.Add ($objPort)

regards

ptrex


Share this post


Link to post
Share on other sites

@SkinnyWhiteGuy

I was to quickly forgot to copy some lines ?!

Const $NET_FW_SCOPE_LOCAL_SUBNET = 1
Const $NET_FW_IP_PROTOCOL_TCP = 6
;Enable Port
Dim $objPort
$objFirewall = ObjCreate("HNetCfg.FwMgr")
$objProfile = $objFirewall.LocalPolicy.CurrentProfile
$objPort = ObjCreate("HNetCfg.FwOpenPort")

$objPort.Name = "DCOM"
$objPort.Port = 888
$objPort.Scope = $NET_FW_SCOPE_LOCAL_SUBNET
$objPort.Protocol = $NET_FW_IP_PROTOCOL_TCP
$objPort.Enabled = True

$objProfile.GloballyOpenPorts.Add ($objPort)

regards,

ptrex


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...