![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@richkang/cdk-construct-network-firewall-textfile-rules
Advanced tools
A simple AWS VPC Firewall with one stateless rule and one stateful rule to meet the AWS Config Network Firewall Conformance.
A simple AWS VPC Firewall with one stateless rule and one stateful rule to meet the AWS Config Network Firewall Conformance.
Stateful rules group can be further extend with Suricata rules as text file
Allows only TCP:80 and TCP:443
Allows only whitelisted domains:
network-firewall
in the same level as cdk-construct
cdk new app --language=typescript
bin/network-firewall.ts
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { NetworkFirewallStack } from '../lib/network-firewall-stack';
const app = new cdk.App();
new NetworkFirewallStack(app, 'NetworkFirewallStack', {
// needs the account and region for the Vpc lookup
env: {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
},
});
lib/rules.txt
as below. More examples can be found in https://suricata.readthedocs.io/en/suricata-6.0.2/rules/intro.htmlpass ip 10.1.0.0/16 any -> 10.0.0.0/16 any (sid:100;)
drop ip any any <> any any (sid:101;)
alert tcp any any -> 1.1.1.1/32 80 (sid:102;msg:"example message";)
drop tls $HOME_NET any -> $EXTERNAL_NET any (tls.sni; content:"example.com"; startswith; nocase; endswith; msg:"matching TLS denylisted FQDNs"; priority:1; flow:to_server, established; sid:103; rev:1;)
drop http $HOME_NET any -> $EXTERNAL_NET any (http.host; content:"example.com"; startswith; endswith; msg:"matching HTTP denylisted FQDNs"; priority:1; flow:to_server, established; sid:104; rev:1;)
lib/network-firewall-stack.ts
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as fwconstruct from '../../cdk-constructs/firewall-distributed-vpc'
export class NetworkFirewallStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const vpc:cdk.aws_ec2.IVpc = cdk.aws_ec2.Vpc.fromLookup(this,"fwVpc",
{
vpcId: <your VPC ID>
});
const subnet = [
cdk.aws_ec2.Subnet.fromSubnetId(this, "subnet1", <subnet 1>),
cdk.aws_ec2.Subnet.fromSubnetId(this, "subnet2", <subnet 2>)
]
new fwconstruct.FirewallDistributedVpc(this,'fw',{
vpc: vpc,
subnetList: subnet,
rulesFile: ["./lib/rules.txt"]
})
}
}
To ensure network firewall conformance, deploy the conformance pack using Network Firewall Conformance Pack.
% aws configservice describe-config-rules --query 'ConfigRules[*].ConfigRuleName'
[
"netfw-policy-default-action-fragment-packets-conformance-pack-ilk1uyn2w",
"netfw-policy-default-action-full-packets-conformance-pack-ilk1uyn2w",
"netfw-policy-rule-group-associated-conformance-pack-ilk1uyn2w",
"netfw-stateless-rule-group-not-empty-conformance-pack-ilk1uyn2w"
]
aws configservice get-compliance-details-by-config-rule --config-rule-name netfw-policy-default-action-fragment-packets-conformance-pack-ilk1uyn2w --query 'EvaluationResults[*].ComplianceType'
[
"COMPLIANT"
]
FAQs
A simple AWS VPC Firewall with one stateless rule and one stateful rule to meet the AWS Config Network Firewall Conformance.
The npm package @richkang/cdk-construct-network-firewall-textfile-rules receives a total of 120 weekly downloads. As such, @richkang/cdk-construct-network-firewall-textfile-rules popularity was classified as not popular.
We found that @richkang/cdk-construct-network-firewall-textfile-rules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.