DioNNiS

How i can sharing port in firewall on remote machine

I fand how do it on local machine (ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.WIN32COM.v10.en/ics/ics/querying_an_icf_port.htm), but I don't now how do it on remote machine...

TIA


Re: Windows SDK Sharing port in windows firewall on remote machine

AndyCadley

You can't remotely open firewall ports (for fairly obvious security reasons). If the compter is a member of an Active Directory then you can use Group Policy to change firewall settings, alternatively you can run a script on the remote box to configure the firewall using netsh (which assumes you already have some method of connecting and executing commands remotely allowed in the firewall exceptions).





Re: Windows SDK Sharing port in windows firewall on remote machine

DioNNiS

you can run a script on the remote box to configure the firewall using netsh

I want write it on C++. Please help me...




Re: Windows SDK Sharing port in windows firewall on remote machine

AndyCadley

If you write it in C++ using the firewall API, you will still need to run that code locally. You cannot make firewall changes remotely.





Re: Windows SDK Sharing port in windows firewall on remote machine

DioNNiS

One of the way:
system("netsh.exe firewall set service type=REMOTEADMIN mode=ENABLE scope=ALL");