Firstly open a Command Prompt as Administrator by right
clicking on 'cmd' from the Start Menu and selecting 'run as
Administrator'. (Its probably best to remove any existing DC++ rules in
the firewall, see Control Panel -> Windows Firewall)
Next we need to create the firewall rules.
netsh advfirewall firewall add rule name="DC++1"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=allow enable=yes remoteip=137.205.0.0/16
netsh advfirewall firewall add rule name="DC++2"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=allow enable=yes remoteip=137.205.0.0/16
netsh advfirewall firewall add rule name="DC++3"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=allow enable=yes remoteip=127.0.0.1
netsh advfirewall firewall add rule name="DC++4"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=0.0.0.1-127.0.0.0
netsh advfirewall firewall add rule name="DC++5"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=0.0.0.1-127.0.0.0
netsh advfirewall firewall add rule name="DC++6"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=127.0.0.2-137.205.0.0
netsh advfirewall firewall add rule name="DC++7"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=127.0.0.2-137.205.0.0
netsh advfirewall firewall add rule name="DC++8"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=137.205.255.255-255.255.255.255
netsh advfirewall firewall add rule name="DC++9"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
action=block enable=yes remoteip=137.205.255.255-255.255.255.255
You should now have DC++ configured to block Off Campus
connections.
To remove these rules you can do so from command line by
running the following commands or you can do it via the GUI from Control Panel.
netsh advfirewall firewall add rule name="DC++1"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++2"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++3"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++4"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++5"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++6"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++7"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++8"
protocol=any dir=out program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"
netsh advfirewall firewall add rule name="DC++9"
protocol=any dir=in program="c:\Program Files (x86)\dc++\DCPlusPlus.exe"