Appending Firewall Rules to vShield Edge with PowerCLI Script

Hi,
I have a script which enables us to upload 4k worth of firewall rules, but every time it executes, all existing rules are over written.
Is this something to do with the API or just a scripting issue - if so, can anyone suggest how to append on to the existing set?
Update:
So obviously the following line seems to create a new instance of the firewall:
$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
Because the next 3 lines after are setting the main firewall parameters again - something you wouldn't need to do if we were just adding new rules to the existing firewall.
$fwService.DefaultAction = "drop"
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $true
Is there a way to use a PowerShell command such as add-member rather than new-object?
param (
[parameter(Mandatory = $true, HelpMessage="vCD Server")][alias("-server","s")][ValidateNotNullOrEmpty()][string[]]$CIServer,
[parameter(Mandatory = $true, HelpMessage="Org")][alias("-vOrg","o")][ValidateNotNullOrEmpty()][string[]]$orgName,
[parameter(Mandatory = $true, HelpMessage="OrgNet")][alias("-orgNet","n")][ValidateNotNullOrEmpty()][string[]]$orgNet,
[parameter(Mandatory = $true, HelpMessage="CSV Path")][alias("-file","f")][ValidateNotNullOrEmpty()][string[]]$csvFile
# Add in the VI Toolkit
if ( (Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null ) {
Add-PSsnapin VMware.VimAutomation.Core
if ( (Get-PSSnapin -Name VMware.VimAutomation.Cloud -ErrorAction SilentlyContinue) -eq $null ) {
Add-PSsnapin VMware.VimAutomation.Cloud
try {
Connect-CIServer -Server $CIServer 2>&1 | out-null
} catch {
Exit
#Search EdgeGW
try {
  $myOrgNet = Get-Org -Name $orgName | Get-OrgNetwork -Name $orgNet
  $edgeHREF = $myOrgNet.ExtensionData.EdgeGateway.Href
  $edgeView = Search-Cloud -QueryType EdgeGateway -ErrorAction Stop | Get-CIView | where {$_.href -eq $edgeHREF}
} catch {
[System.Windows.Forms.MessageBox]::Show("Exception: " + $_.Exception.Message + " - Failed item:" + $_.Exception.ItemName ,"Error.",0,[System.Windows.Forms.MessageBoxIcon]::Exclamation)
  Exit
#Item to Configure Services
$edgeView.Configuration.EdgeGatewayServiceConfiguration
$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
$fwService.DefaultAction = "drop"
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $true
$fwService.FirewallRule = @()
Ipcsv -path $csvFile |
foreach-object
$fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule
$rowNum = $_.Num -as [int]
$fwService.FirewallRule[$rowNum].description = $_.Descr
$fwService.FirewallRule[$rowNum].protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
switch ($_.Proto)
"tcp" { $fwService.FirewallRule[$rowNum].protocols.tcp = $true }
"udp" { $fwService.FirewallRule[$rowNum].protocols.udp = $true }
"any" { $fwService.FirewallRule[$rowNum].protocols.any = $true }
default { $fwService.FirewallRule[$rowNum].protocols.any = $true }
$fwService.FirewallRule[$rowNum].sourceip = $_.SrcIP
if ($_.SrcPort -eq "any" ) { $srcPort = "-1" } else { $srcPort = $_.SrcPort }
$fwService.FirewallRule[$rowNum].sourceport = $srcPort
$fwService.FirewallRule[$rowNum].destinationip = $_.DstIP
$fwService.FirewallRule[$rowNum].destinationportrange = $_.DstPortRange
$fwService.FirewallRule[$rowNum].policy = $_.Policy
#$fwService.FirewallRule[$rowNum].direction = $_.Direction
#$fwService.FirewallRule[$rowNum].MatchOnTranslate = [System.Convert]::ToBoolean($_.MatchOnTranslate)
$fwService.FirewallRule[$rowNum].isenabled = [System.Convert]::ToBoolean($_.isEnabled)
$fwService.FirewallRule[$rowNum].enablelogging = [System.Convert]::ToBoolean($_.EnableLogging)
#configure Edge
$edgeView.ConfigureServices($fwService)
Thanks,
Scott.

Hi,
Agree with Ed, you can publish CAS array VIP to internet, and use it to configure Federated Delegation.
Thanks.
Niko Cheng
TechNet Community Support

Similar Messages

  • VCloud: vShield Edge FW Rules

    Hi all
    I'm looking for a way to get and set firewall rules on a vShield Edge firewall in a vCloud environment.  My final target is to write two scripts; one that will export the firewall rules from a given vShield Edge firewall to CSV and another script that will import them from CSV into another vShield Edge firewall.  This is to help with a DR scenario where we'll shift a public IP block from a public facing vShield Edge in one vCloud environment to one in another environment.
    I need to do this through the vCloud API or PowerCLI because, if I do it directly at the vShield Manager, vCloud won't know about the changes that have been made.  I'm not a Powershell expert by any means but I'm picking things up as I have a need for them.  I've looked through several blog posts people have written and it looks as though I need to dig down into ExtensionData as there aren't get and sets for the info I'm after.  I've found some info which is really close to what I'm after in this post:
    Deepdive: vCloud vApp Networks | Geek after Five
    This covers pulling the information from the GetNetworkConfigSection method in the Extensiondata of a vApp.  The issue I have is that the vShield Edge / network I'm after information from, isn't actually in a vApp.  It's a bit of a funny setup but I've got a vShield Edge firewall connected to the Internet and to an Org Network.  No VMs or vApps are connected to the Org Network.  Instead, I have about a dozen vApps, each with a vApp network and a vShield Edge connecting the vApp network to the Org Network.  This was a strategy recommended by VMware to overcome the limitation of 10 networks on the public facing vShield Edge and works brilliantly in that respect.  However... the public facing vShield Edge and Org Network are not in a vApp I can't use $vapp.ExtensionData.GetNetworkConfigSection()
    Thinking about it while writing this, I guess one option would be to create another vApp and add the Org Network to it, then I might be able to get the info using GetNetworkConfigSection() but I wonder if there is a better/proper/prettier way to do it.
    thanks in advance!
    Dave

    So one of my more skilled colleagues matured this script and incorporated forcing you to specify both the OrgName and the VSE name to reduce errors as well as input from a CSV. I'll have a go at incorporating existing rules via VSM api soon.
    # Replaces all rules for a given vshield with the ones from a CSV file.
    # CSV header is: Num,Descr,Proto,SrcIP,SrcPort,DstIP,DstPortRange,Policy,Direction,isEnabled,EnableLogging
    # http://pubs.vmware.com/vcd-51/index.jsp?topic=%2Fcom.vmware.vcloud.api.reference.doc_51%2Fdoc%2Ftypes%2FFirewallRuleType.html
    # Note: SrcPort can be -1 (for any), any or a port number. DstPortRange can be any or a port number range (ex: 22-26)
    param (
    [parameter(Mandatory = $true, HelpMessage="vCD Server")][alias("-server","s")][ValidateNotNullOrEmpty()][string[]]$CIServer,
    [parameter(Mandatory = $true, HelpMessage="Org")][alias("-vOrg","o")][ValidateNotNullOrEmpty()][string[]]$orgName,
    [parameter(Mandatory = $true, HelpMessage="OrgNet")][alias("-orgNet","n")][ValidateNotNullOrEmpty()][string[]]$orgNet,
    [parameter(Mandatory = $true, HelpMessage="CSV Path")][alias("-file","f")][ValidateNotNullOrEmpty()][string[]]$csvFile
    # Add in the VI Toolkit
    if ( (Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null ) {
    Add-PSsnapin VMware.VimAutomation.Core
    if ( (Get-PSSnapin -Name VMware.VimAutomation.Cloud -ErrorAction SilentlyContinue) -eq $null ) {
    Add-PSsnapin VMware.VimAutomation.Cloud
    try {
    Connect-CIServer -Server $CIServer 2>&1 | out-null
    } catch {
    Exit
    #Search EdgeGW
    try {
      $myOrgNet = Get-Org -Name $orgName | Get-OrgNetwork -Name $orgNet
      $edgeHREF = $myOrgNet.ExtensionData.EdgeGateway.Href
      $edgeView = Search-Cloud -QueryType EdgeGateway -ErrorAction Stop | Get-CIView | where {$_.href -eq $edgeHREF}
    } catch {
    [System.Windows.Forms.MessageBox]::Show("Exception: " + $_.Exception.Message + " - Failed item:" + $_.Exception.ItemName ,"Error.",0,[System.Windows.Forms.MessageBoxIcon]::Exclamation)
      Exit
    #Item to Configure Services
    $edgeView.Configuration.EdgeGatewayServiceConfiguration
    $fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
    $fwService.DefaultAction = "drop"
    $fwService.LogDefaultAction = $false
    $fwService.IsEnabled = $true
    $fwService.FirewallRule = @()
    Ipcsv -path $csvFile |
    foreach-object `
    $fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule
    $rowNum = $_.Num -as [int]
    $fwService.FirewallRule[$rowNum].description = $_.Descr
    $fwService.FirewallRule[$rowNum].protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
    switch ($_.Proto)
    "tcp" { $fwService.FirewallRule[$rowNum].protocols.tcp = $true }
    "udp" { $fwService.FirewallRule[$rowNum].protocols.udp = $true }
    "any" { $fwService.FirewallRule[$rowNum].protocols.any = $true }
    default { $fwService.FirewallRule[$rowNum].protocols.any = $true }
    $fwService.FirewallRule[$rowNum].sourceip = $_.SrcIP
    if ($_.SrcPort -eq "any" ) { $srcPort = "-1" } else { $srcPort = $_.SrcPort }
    $fwService.FirewallRule[$rowNum].sourceport = $srcPort
    $fwService.FirewallRule[$rowNum].destinationip = $_.DstIP
    $fwService.FirewallRule[$rowNum].destinationportrange = $_.DstPortRange
    $fwService.FirewallRule[$rowNum].policy = $_.Policy
    $fwService.FirewallRule[$rowNum].direction = $_.Direction
    $fwService.FirewallRule[$rowNum].MatchOnTranslate = [System.Convert]::ToBoolean($_.MatchOnTranslate)
    $fwService.FirewallRule[$rowNum].isenabled = [System.Convert]::ToBoolean($_.isEnabled)
    $fwService.FirewallRule[$rowNum].enablelogging = [System.Convert]::ToBoolean($_.EnableLogging)
    #configure Edge
    $edgeView.ConfigureServices($fwService)
    Example of the csv file:
    Num,Descr,Proto,SrcIP,SrcPort,DstIP,DstPortRange,Policy,Direction,MatchOnTranslate,isEnabled,EnableLogging
    0,Allow incoming 80 to webS,tcp,any,any,172.31.31.100,80,allow,in,true,true,false
    1,Allow incoming 22 to webS,tcp,any,any,172.31.31.100,22,allow,in,true,true,false
    2,Allow all outgoing,any,any,any,any,any,allow,out,true,true,false
    Example of invocation:
    .\load_firewall_rules.ps1 -s 10.16.1.229 -o "Org" -n "DmzNet" -f .\test_csv.csv

  • Add firewall rule with custom environment variable in program path

    Hi,
    We want to create a firewall rule for a program which is placed in folder which changes sometimes. I know you can add a firewall with the ProgramFiles environment variable like this:
    netsh advfirewall firewall add rule name="Test Firewall rule" dir=in program="%%ProgramFiles%%\Test\Test.exe" action=allow security=notrequired
    The environment variable ProgramFiles isn't expanded and if the Program Files folder is different on a system the rule still works.
    We try to use this with a custom environment variable which we set a system environment variable with this command:
    SETX SomeFolder "D:\Some Folder\Apr 2015" /M
    If we use the command below to add the firewall rule in a batch file the environment variable SomeFolder is expanded correctly and the program path is added as a static path.
    netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%SomeFolder%\AFile.exe" action=allow security=notrequired
    Because the folder changes sometimes we want to change the environment variable SomeFolder and not remove the old firewall rule and create a new one. We want to add the environment variable SomeFolder to the program path as a (dynamic) environment variable
    and not as the expanded path at the moment when the rule is added. If we use this command:
    netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%%SomeFolder%%\AFile.exe" action=allow security=notrequired
    We get the error:
              Windows Firewall with Advanced Security
              An error occurred while adding the rule.
              Error: The parameter is incorrect
              Status: The application name could not be resolved
              OK   
    Why can't we use %%SOMEFOLDER%% like we can use %%PROGRAMFILES%%? The same error is shown when we try to add the firewall rule through the management console 'Windows Firewall with Advanced Security'
    W. Spu

    Hi,
    Based on my plenty of test with this problem, it seems like there is no better method to achieve your requirement. To add new policy to firewall, it would be better using general cmdlet. The path parameter like %%SomeFolder%% do have problem in add firewall
    policy cmdlet. 
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • New firewall, old rules and settings replaced with out warning.

    Is there no way to get back all my firewall rules i had before i installed Leopard?

    I'm afraid not. No one really gets why Apple did what they did with the firewall in Leopard. It's a total step backwards from the firewall in Tiger, I really hate it.

  • Editing firewall rules: adding ip addresses into firewall rule

    I foud a out to use "netsh advfirewall firewall set rule name = "name" new remoteip=1.1.1.1" for setting an ip address into a rule.
    But how can I add an ip to the rule? In this case I would replace the IP adresses and not add one.
    Background is that I have a firewall rule on my FTP Server to block several ip ranges due normal brute force attacks. This works but I plan to write a program for this to do this automaticly. So I need to append the list.
    Any hints?

    Thank you for the reply.
    Meanwhile I found a way which is ok for me.
    Background:
    I have a public FTP which I want to limit the access to my country only because this would be enough. The advantage of doeing this is that I can avoid bruteforce attacks from other countries (mostly from Asia).
    I wrote a text file with the information which is needed for the netsh. Here I can modify the text.
    In this script I looked for the provider addresses from ripe.net.
    pushd advfirewall
    set store gpo=<policy>
    popd
    pushd advfirewall firewall
    set rule name="FTP (eingehend)" new remoteip=194.25.0.0/16,193.158.0.0/16,193.159.0.0/16,195.145.0.0/16,62.156.0.0/16,195.243.0.0/16,62.157.0.0/16,212.184.0.0/16,212.185.0.0/16,62.158.0.0/16,62.159.0.0/16,62.155.0.0/16,62.154.0.0/16,62.153.0.0/16,62.224.0.0/16,62.225.0.0/16,62.226.0.0/15,217.0.0.0/13,217.80.0.0/12,217.224.0.0/11,80.128.0.0/11,81.28.64.0/20,84.128.0.0/10,87.128.0.0/11,87.160.0.0/11,91.0.0.0/10,79.192.0.0/10,93.192.0.0/10,160.44.0.0/16,164.16.0.0/12,164.32.0.0/15,164.34.0.0/16,195.50.128.0/19,195.50.160.0/19,212.144.0.0/16,145.253.0.0/16,145.254.0.0/16,213.23.0.0/17,213.23.128.0/17,82.82.0.0/15,84.56.0.0/13,88.64.0.0/12,92.72.0.0/13,94.216.0.0/13,188.96.0.0/12,212.59.32.0/19,81.14.128.0/17,89.182.0.0/15,89.182.0.0/15,89.14.0.0/15,77.176.0.0/12,93.128.0.0/13,95.112.0.0/12,151.189.128.0/17,151.189.64.0/18,151.189.0.0/18,80.226.0.0/16,90.186.0.0/15,77.24.0.0/15,193.254.128.0/19,193.254.160.0/20,80.187.0.0/16,88.128.0.0/16,212.23.96.0/19,92.116.0.0/15,188.46.0.0/16,193.100.0.0/15,193.96.0.0/14,193.102.0.0/16,193.103.0.0/16,194.115.0.0/16,194.139.0.0/16,194.172.0.0-194.175.255.255,193.155.0.0/16,195.124.0.0-195.127.255.255,213.68.0.0/16,213.69.0.0/16,213.70.0.0/15,195.90.0.0/19,195.158.160.0/19,212.202.0.0/16,213.160.0.0/19,213.148.128.0/19,217.146.0.0/16,212.60.192.0/18,83.236.0.0/16,84.245.128.0/18,87.193.0.0/16,87.234.0.0/16,92.192.0.0/11,83.169.128.0/18,88.134.0.0/16,91.64.0.0/14,77.20.0.0/14,95.88.0.0/14,188.192.0.0/14,195.80.192.0/19,195.32.128.0/17,212.63.32.0/19,212.5.0.0/19,212.4.160.0/19,212.84.192.0/18,212.110.192.0/19,212.105.192.0/19,194.140.96.0/19,62.145.0.0/19,212.99.128.0/18,212.99.192.0/19,62.206.0.0/16,62.8.128.0/17,217.78.160.0/20,213.217.64.0/18,82.113.96.0/19,89.204.128.0/19,194.97.0.0/16,62.104.0.0/16,195.20.224.0/19,212.227.0.0/16,213.165.64.0/19,217.72.192.0/20,217.160.0.0/16,2.165.0.0/16,87.106.0.0/16,93.122.0.0/17,193.254.128.0/19,193.254.160.0/20,80.187.0.0/16,88.128.0.0/16,172.16.0.0/16

  • 0x8007000e (E_OUTOFMEMORY) while adding a firewall rule using the windows firewall COM API

    Hello,
    Configuration: Windows Embedded 8 64-bit.
    I'm using the Windows Firewall with Advanced Security COM API. The program uses the INetFwRules interface. Basically, I'm using the following code (Form the code sample available here : http://msdn.microsoft.com/en-us/library/windows/desktop/dd339604%28v=vs.85%29.aspx.)
     I get the error when performing "hr = pFwRules->Add(pFwRule);".
    We can also encounter the problem when removing a rule (using pFwRules->Remove(ruleName);)
    HRESULT hrComInit = S_OK;
    HRESULT hr = S_OK;
    INetFwPolicy2 *pNetFwPolicy2 = NULL;
    INetFwRules *pFwRules = NULL;
    INetFwRule *pFwRule = NULL;
    long CurrentProfilesBitMask = 0;
    BSTR bstrRuleName = SysAllocString(L"SERVICE_RULE");
    BSTR bstrRuleDescription = SysAllocString(L"Allow incoming network traffic to myservice");
    BSTR bstrRuleGroup = SysAllocString(L"Sample Rule Group");
    BSTR bstrRuleApplication = SysAllocString(L"%systemroot%\\system32\\myservice.exe");
    BSTR bstrRuleService = SysAllocString(L"myservicename");
    BSTR bstrRuleLPorts = SysAllocString(L"135");
    // Initialize COM.
    hrComInit = CoInitializeEx(
    0,
    COINIT_APARTMENTTHREADED
    // Ignore RPC_E_CHANGED_MODE; this just means that COM has already been
    // initialized with a different mode. Since we don't care what the mode is,
    // we'll just use the existing mode.
    if (hrComInit != RPC_E_CHANGED_MODE)
    if (FAILED(hrComInit))
    printf("CoInitializeEx failed: 0x%08lx\n", hrComInit);
    goto Cleanup;
    // Retrieve INetFwPolicy2
    hr = WFCOMInitialize(&pNetFwPolicy2);
    if (FAILED(hr))
    goto Cleanup;
    // Retrieve INetFwRules
    hr = pNetFwPolicy2->get_Rules(&pFwRules);
    if (FAILED(hr))
    printf("get_Rules failed: 0x%08lx\n", hr);
    goto Cleanup;
    // Create a new Firewall Rule object.
    hr = CoCreateInstance(
    __uuidof(NetFwRule),
    NULL,
    CLSCTX_INPROC_SERVER,
    __uuidof(INetFwRule),
    (void**)&pFwRule);
    if (FAILED(hr))
    printf("CoCreateInstance for Firewall Rule failed: 0x%08lx\n", hr);
    goto Cleanup;
    // Populate the Firewall Rule object
    pFwRule->put_Name(bstrRuleName);
    pFwRule->put_Description(bstrRuleDescription);
    pFwRule->put_ApplicationName(bstrRuleApplication);
    pFwRule->put_ServiceName(bstrRuleService);
    pFwRule->put_Protocol(NET_FW_IP_PROTOCOL_TCP);
    pFwRule->put_LocalPorts(bstrRuleLPorts);
    pFwRule->put_Grouping(bstrRuleGroup);
    pFwRule->put_Profiles(CurrentProfilesBitMask);
    pFwRule->put_Action(NET_FW_ACTION_ALLOW);
    pFwRule->put_Enabled(VARIANT_TRUE);
    // Add the Firewall Rule
    hr = pFwRules->Add(pFwRule);
    if (FAILED(hr))
    printf("Firewall Rule Add failed: 0x%08lx\n", hr);
    goto Cleanup;
    This works pretty well but, sometimes, at system startup, adding a rule ends up with the error 0x8007000e (E_OUTOFMEMORY) ! At startup, the system is always loaded cause several applications starts at the same time. But nothing abnormal. This is quite a random
    issue.
    According MSDN documentation, this error indicates that the system "failed to allocate the necessary memory".
    I'm not convinced that we ran out of memory.
    Has someone experienced such an issue? How to avoid this?
    Thank you in advance.
    Regards, -Ruben-

    Does Windows 8 desktop have the same issue? Are you building a custom WE8S image, or are you using a full WE8S image? The reason I ask is to make sure you have the modules in the image to support the operation.
    Is Windows Embedded 8.1 industry an option?
    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

  • Can't add a new Firewall Rule

    I have a very curious issue: I cannot add any new firewall rules at all! Clicking on the New Button does nothing and on the console I get
    System Preferences[487] * -[NSCFString objectForKey:]: selector not recognized [self = 0x3f11b0]
    I have flushed the firewall with ipfw, deleted the plist file, repaired permissions but the problem ist still there. Any suggestions? (apart from reinstallation)
    Adding Firewall Rules through ipfw works...

    Whenever I use ipfw I lose the ability to use System Preferences. At first I thought that it compared kernel memory with the plist file and if it found a difference, assumed another firewall was running and disabled itself. But I also deleted the plist file (assuming it would build one from kmem) but that didn't work. Right now I assume there's another file somewhere. It wouldn't make any sense to keep another table in kmem. The weird part is that rules can be the same, but different sequence numbers will cause this problem. There weren't sequence numbers in the plist file, so there's probably another file somewhere.
    I think your error is from the missing plist file. A reboot should clear it up.

  • SA 540 INBOUND FIREWALL RULES NOT WORKING

    Hi all,
    I am having trouble configuring the firewall for the SA 540.
    client 1 (160.222.46.154) ----- switch ------ sa 540 ------ cisco 887 W ------ client 2 (50.0.0.10).
    client 1 can ping client 2, however client 2 cannot ping client 1. The default outbound policy (allow all) is set on the sa 540, and I have tried configuring a blanket ipv4 rule on the sa 540 to allow 'all' to 'any' (for all services) related to traffic from the WAN to LAN, and visa versa. The output from the logs are as follows:
    Fri Jan 7 13:43:04 2000(GMT +1000) WARN FIREWALL 50.0.0.10 160.222.46.154 [firewall] LOG_PACKET[DROP] IN=WAN OUT=WAN SRC=50.0.0.10 DST=160.222.46.154 PROTO=ICMP TYPE=8 CODE=0
    Component: KERNEL
    Fri Jan 7 13:43:09 2000(GMT +1000) WARN FIREWALL 50.0.0.10 160.222.46.154 [firewall] LOG_PACKET[DROP] IN=WAN OUT=WAN SRC=50.0.0.10 DST=160.222.46.154 PROTO=ICMP TYPE=8 CODE=0
    Component: KERNEL
    Fri Jan 7 13:43:14 2000(GMT +1000) WARN FIREWALL 50.0.0.10 160.222.46.154 [firewall] LOG_PACKET[DROP] IN=WAN OUT=WAN SRC=50.0.0.10 DST=160.222.46.154 PROTO=UDP SPT=60737 DPT=53
    Component: KERNEL
    Basically any connection identified as coming in from the WAN (i.e. IN=WAN) is dropped. I set up a new vlan on the cisco 887 W, in the 160.222.46.x address space, and connected a spare port directly to the sa 540 and had no problem testing connectivity to any device via ping. Obviously the zone communication is LAN to LAN and firewall treats the traffice differently.
    I assumed that creating an all encompassing rule to allow all trafiic, for all services, between the LAN and WAN (in both directions) would be equivalent to placing the appliance in PASS THROUGH mode? There is no securtiy set on the 887 W or the switch.
    Also is anybody could explain what 'SELF' means in the conttext IN=SELF or OUT=SELF it would be much appreciated. Firmware is latest.
    Thank you.
    Regards
    Marc

    On closer analysis and with some help from Experts Exchange it did seem non sensical to have both the IN and OUT as the WAN interface, but I had literally exhausted every avenue possible bar 1- changing the routing mode to CLASSIC and configuring a static route (which was at a higher administrative level than my RIP advertised routes) and took preferece when forwarding the packets.
    Now the SA540 firewall rules work as I would expect and I can route between all zones. To summise it appears as if the Double NAT from the router (887W) and then the SA540 was the issue, and the innability to configure any workaround in the interface of the SA54O firewall rules.
    It really makes you appreciate the power of the command line and the full scope of CIsco's command line options. Does anybody know if (and how) it would be possible to configure Double NAT on the SA540?
    Regards
    Marc

  • [Solved] Windows Firewall rule that allows Windows Update

    Can anyone kindly give me a Windows Firewall rule that allows Windows Update? Assume I'm running MMC's "Windows Firewall with Advanced Security" snap-in as Administrator. Note that a "solution" that takes down the outbound firewall is
    not acceptable.
    Thank You.
    ===== Solution =====
    Suppose that, as the default, you've set the outbound firewall to block (see
    To close the outbound firewall, below). In order for Windows Update to check whether an update is available and then to download the update files, you first need an outbound firewall
    allow-rule that allows the Windows Update service to pass through the outbound firewall.
    Prerequisite: Knowledge of the Microsoft Management Console (MMC) and its "Windows Firewall with Advanced Security" plug-in.
    What you will do: You will use the "Windows Firewall with Advanced Security" MMC plug-in to create an outbound firewall rule that
    allows '%SystemRoot%\System32\svchost.exe' (the generic service driver) to pass through the outbound firewall on behalf of 'wuauserv' (the name of the specific service that performs the update).
    Warning: If you don't know what I'm writing about, get help.
    Name: Allow Windows Update (...or any name you prefer - it doesn't matter)
    Group:
    Profile: Public
    Enabled: Yes
    Action: Allow
    Program: %SystemRoot%\System32\svchost.exe
    Local Address: Any
    Remote Address: Any
    Protocol: Any
    Local Port: Any
    Remote Port: Any
    Allowed Computers: Any
    Status: OK
    Service: wuauserv
    Rule Source: Local Setting
    Interface Type: All interface types
    Excepted Computers: None
    Description:
    To open the outbound firewall:
    More accurate wording would be
    Outbound connections are allowed unless explicitly blocked by a rule.
    If you look at the standard rules you will find no block-rules. That means that nothing is blocked, everything is allowed, and the outbound firewall is wide open.
    To close the outbound firewall:
    More accurate wording would be
    Outbound connections are blocked unless explicitly allowed by a rule.
    If you look at the standard rules you will find only allow-rules that have been crafted to allow the vital Windows connections to pass through the outbound firewall. To an informed observer it's obvious that the firewall engineers crafted these
    allow-rules so that users who closed the outbound firewall wouldn't have to write them. But the firewall engineers left out Windows Update.

    Hi mark,
    Thanks for sharing, it will help other users who have similar issue.
    Regards

  • Cisco Security Manager and User-aware firewall rules

    Hello !
    I have a firewall ASA which is managed with CSM and I try to create some user-aware rules. To do this, I need to match CSM with an Active Directory server.
    I added an AAA server group matching my Active Directory server in the Identity Setting menu from Security Manager Administration and when i click on "Test", I obtain the error message "Unsuccessful Bind prevented to fetch data, please reconfigure AAA server".
    What can I do to solve this problem ?
    Thank you !
    Stephane

    You can contact your local AM to get an evaluations version, this is related to the new 'restricted' downloaded access on CCO. You need to have a service contract assocaited for that 'specific' product to download software (I know it does not make sense in case of an evaluation).
    And you also have the following alternate:
    Note:
    This download does not include  CiscoWorks Resource Manager Essentials (RME). For customers that wish to  also evaluate CiscoWorks RME or that prefer a media format rather than a  large download, an evaluation DVD can be ordered from Cisco  Marketplace. At http://www.cisco.com/pcgi-bin/marketplace/welcome.pl,  navigate to the Collateral and Subscriptions Store and search for part  number EVAL-CSMGR-4.0.
    Regards
    Farrukh

  • DLINK 2750B - Entering Custom Firewall Rules

    I am having difficulty entering these rules below. I seem to be able to add the "allow" but dont see how to add the blocking. How does one block a a port to an IP or IP range? ALLOW TCP/UDP IN/OUT to 208.67.222.222 or 208.67.220.220 on Port 53 and below it BLOCK TCP/UDP IN/OUT all IP addresses on Port 53 Forcing DNS so it can not be circumvented to OpenDNS parent filter, I dont care if its not supported, I just need to know if it can be done. Any ASSISTANCE, specifically with this firewall setting on this device, in performing this task with this modem is greatly appreciated, color commentary is not. Thank you very much!

    In this case, you will want to make sure the DNS Rule for allowing the DNS traffic is allowed with priority over the deny policy. Make your allow policy by specifying TCP and UDP as allowed, Port 53, to both of OpenDNS's servers. Two identical rules, less the IPs will need to be created in many cases.
    In most cases, you can usually set an "All IPs" range by leaving the IP address set to 0.0.0.0 with Port 53 and TCP/UDP set. Note that because DNS can work over either TCP or UDP depending on the server, you must filter both protocols. It is best to use "REJECT" in order to kill off DNS requests, as "DROP" will cause latency.
    I do not know how the D-Link will treat creating rules in this fashion, let us know what your results are. If your question involves where the Deny/Reject/Drop options are for the firewall rules, then please provide a screenshot of what you see to help us out.
    ========
    The first to bring me 1Gbps Fiber for $30/m wins!

  • Mac Mini, iTunes 7.4.2, Mac OS X 10.4.10 -- firewall rules are broken

    Last night I updated from 7.4.1 to 7.4.2. Nothing else changed on my Mac Mini (Intel Core 2 DUO) running Mac OS X 10.4.10.
    I immediately found that none of my other computers nor my Apple TV could reach my shared music library, which is hosted by the Mac Mini.
    I normally run with the firewall enabled and in fact the box is checked to allow iTunes music sharing. HOWEVER, since upgrading to iTunes 7.4.2, the firewall rule is somehow no longer sufficient.
    I had to turn off the firewall in order for my other computers and the Apple TV to be able to reach my shared library on my Mac Mini.
    Effectively, something has changed w.r.t. sharing in iTunes 7.4.2, such that the default firewall rules in Mac OS X 10.4.2 are no longer allowing clients to connect to the iTunes shared libraries.

    The 1G iPod should still work OS X 10.4.11 (Tiger).  Since the Mac still sees the iPod as an externally mounted drive, we'll take that as a good sign.
    Have you seen this article yet?
    iPod does not appear in iTunes or iPod updater in Mac OS X
    And perhaps work through all the suggestion here as well?
    iPod not recognized in iTunes and Mac desktop
    B-rock

  • RV320 Firewall rules, VLAN, and IP Aliasing

    I have purchased and RV320 to replace our SA520W Router.  I have 2 SBS servers that are on seperate VLANS.
    The RV 320 is set with WAN 1 IP of XX.XX.XX.43
    SBS1 has internal IP of XX.XX.16.2 on VLAN 1 port 1 on router
    SBS2 has internal IP of XX.XX.2.2 on VLAN 5 port 2 on router
    On the older SA520W I was able to setup an IP alias of XX.XX.XX.47 and XX.XX.XX.46 with firewall rules so 47 pointed to SBS1 and 46 pointed to SBS2 for their respective ports.
    How do I do that on the RV320 so I can have 2 IPs server from the isp than go through WAN1 to their respective VLANs?

    SBaalman1,
    The feature you are looking for is called One-to-One NAT on most of the Cisco SMB routers. You can find it under Setup.
    - Marty

  • SA540 Firewall Rules Fail when Optional Port Configured to Failover

    Today, I configured a client's SA540 for failover.  The primary WAN port is FIOS with a static IP address.  The optional port is Road Runner cable with a static IP address.  The failover tested successfully.  However, now the SA540 cannot be accessed on its internal IP address (https://192.168.1.1) and none of the firewall rules work any longer.  There are several rules but to name two; remote desktop port forwarding to an internal server, and HTTPS to another internal server.  Both rules use IP addresses different than the SA540's WAN IP address.  Additional external IP addresses were configured previously and assigned and they worked up to the point were the failover was configured.
    Now here is the strange part.  If the optional port cable is removed from the port, everything returns to normal, but plug it back in and problems.  I even tried disabling failover in the SA540's configuration and it made no difference unless the cable was unplugged.
    As you might imagine the client is upset about this.  Anyone have any ideas? 
    The firmware is 2.1.18.
    Tony
    PS.  About an hour after I posted this, I tried moving the remote desktop external connection from one of the additional IP addresses configured in the SA540 to the dedicated WAN address and remote desktop sessions were then forwarded into the correct server.  Apparently, the additional IP addresses are not working with the two ISP failover configured, or at least it doesn't work in my configuration.  Any help on this would be much appreciated.  The additional IP addresses are configured in the same subnet as the dedicated (primary) WAN port.   Again, this worked until failover with another ISP was configured.

    This issue has been resolved. After much testing and discussions with the great guys at Cisco TAC, we determined that Verizon FIOS is doing something on their routers to defeat use of IP aliasing. If you have FIOS and you must have more than one IP address and expect to create an IP alias to direct traffic in a 1 to 1 NAT to a node on your network, FIOS doesn’t work. Contact with Verizon technical support is no help. They are oblivious to the problem and don’t want to be bothered.
    Tony Lombardi

  • ISA 550 Firewall Rule - how to specify a domain (to resolve a DDNS)

    I want to lock down access to an ISA 550 Firewall to 4 locations.  2 of the locations have dynamic IP addresses.
    Both sites have a dynamic domain maintained at no-ip.org.
    How can I enter 'name.no-ip.org' in to a firewall rule?

    There is not a way to use a domain name in a firewall rule.  When the traffic comes in the packets are addressed with IPs, not with domain names, so when the router looks things up it compares IP addresses. 
    In fact I have never seen this done, even on an enterprise device.  I'm not saying nothing can do it, but it definitely isn't possible with the ISA. 
    Your best bet would be to try and get some static IPs for those two sites as well.
    It is however possible to setup site-to-site VPNs between these devices even if some of them are using DDNS.  This does require those other site's routers to support site-to-site tunnels.  That way those four sites would be able to access resources behind the ISA, but no one else would, and you could still keep using the DDNS for the two dynamic sites.
    Thank you for choosing Cisco,
    Christopher Ebert
    Network Support Engineer - Cisco Small Business Support Center
    *please mark/rate helpful answers*

Maybe you are looking for

  • I can not see the ipad in itunes

    I'm trying to use remote on mi iPad and I do not see it on iTunes. I have al updated.

  • HT4061 im not able to activate my iphone 3gs after upgrading to ios6, saying server not available, what i can do

    im not able to activate my iphone 3gs after upgrading to ios6, saying server not available try later. im not able to make my phone work, not able to bring serial # im in guatemala what i can do?

  • What's wrong with my Satellite L305D-S5892 screen?

    I never had any problems with it before, the screen as shown in the video would often do whats shown then the screen would resume fine no problems. now all it does is that. I hooked my laptop to my HDTV and it displays it fine, but it doesn't on the

  • Lync 2013 do not show own photo

    We have Lync 2013 and Exchange 2010. I imported photos to our AD. In Outlook 2010 we can see our own photo, but Lync 2013 client do not display user own photo, but when user1 write a message to user2, user2 receive message with user1 photo. This is 

  • Pictures on the desktop

    Does anyone know how to change the time period that photos will rollover on the desk top. Currently I have 5-second, 1, 5, 15 and 30 minutes. I want to hold the photos for 10-15 seconds before they change. Is there any way this can be achieved??