Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


October 2006

Netsh Adds Security to IPsec

Encrypt and digitally sign your communications from the command line
RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

The final three parameters correspond to three check boxes in the GUI of an IPsec filter action. The first check box is Accept unsecured communication, but always respond using IPSec. Suppose you have an XP box with a basic IPsec rule in place: This computer sends encrypted responses when it's asked to do so, but it never initiates encryption. If that XP system tries to retrieve Web content on your secured Web server, the Web server will accept the HTTP request but respond in encrypted IPsec. At this point, the client either doesn't understand IPsec and simply stops communicating, or it does understand and starts replying via IPsec. Selecting this check box isn't necessarily a bad idea—in fact, if you intend to equip your client systems with only the built-in IPsec policy named Client (Respond Only), you'll have to select it—but I don't like it. Plenty of Web applications stuff authentication details into the initial HTTP request, so I'm uncomfortable with the possibility that even the first communication to a secure Web server might travel in clear text. The inpass=no parameter clears that check box and avoids any chance of clear text occurring on the introductory communication.

The Allow unsecured communications with non-IPSec-aware computers check box is a terribly bad idea. Essentially, it requests encrypted communications from clients, but if they're unable to accommodate that request, the unsecure communications are permitted anyway. Remember, folks, malicious users don't need all your passwords; they need only one. The soft=no parameter clears that check box.

Finally, the qmpfs=yes parameter modifies the way IPsec changes its encryption/ signing keys. To thwart malicious users, IPsec regularly changes cryptographic keys. (You can configure IPsec to rekey as often as you want.) The new keys are mathematically related to the previous keys; therefore, if a key is compromised, an intruder might be able to figure out the subsequent keys. If you don't mind a slight performance slowdown, enable the Use session key perfect forward secrecy check box. By doing so, you enable a different approach to generating new keys. Instead of generating a key based on the previous key, IPsec reauthenticates the two parties and lets the authentication mechanism—Kerberos, in our case—generate a new key that's completely unrelated to the previous keys.

Choosing qmpfs=yes reauthenticates with every key.

What's the Rule?
To create the rule, we'll combine the filter list, the filter action, and the third item that we didn't need last month: authentication. IPsec supports three approaches: a shared secret password (a terrible idea except in testing situations), the built-in Kerberos infrastructure that connects every system in an Active Directory (AD) forest, or an X.509 certificate exchange. Windows IPsec uses Kerberos by default, and I'll use that for this example. The Netsh command to build the rule looks like

netsh ipsec static add rule name="Encrypt 80"
  policy="Require encryption on Web
  "filterlist="80 in or out" filteraction="
  force triple DES" Kerberos=yes desc="Secures Web traffic" 

The Add Rule parameter is present because we're adding a rule. Next, the command names the rule and names the policy that includes this rule. (You can't use rules in more than one policy.) Then, the command names the filter list and filter action. The Kerberos=yes parameter specifies Kerberos authentication, and the command ends with a description. Now, you need only enable the policy, as we did last month, or go to the GUI to get it going.

End of Article

   Previous  1  [2]  Next  


Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Articles Use Netsh to Easily Change IP Addresses

Security Whitepapers Reducing the Costs and Risks of Branch Office Data Protection

Solving Desktop Management Challenges in Healthcare

Solving Desktop Management Challenges in Education

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

No Do Overs – Get Virtualization Right the First Time

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement