Go Firewall Rule Self-Service – v0.03

This current version will use the Go web application to create a Cisco ASA firewall rule on the OUTSIDE interface to permit traffic to my DMZ server on port 8000. The firewall rule on the ASA will be created without any Cisco ASA CLI commands used. Currently, it is a manual process to have any Terraform commands run. Future versions will put this in a GitLab CI/CD pipeline to make it more seamless and accountable to the changes that have been made.

In version 0.03, I have made changes by adding the banner error for duplicate firewall rule to alert on button press and not to need to refresh the page. This keeps the user’s form input preset.
Other changes I have made are due to the testing with Terraform in the Cisco ASA lab. They are mostly around getting the format correct for Terraform.

I am using the GitLab project for the ASA. This is a base setup for my lab in GNS3. The test I will demonstrate will be to connect to a mini web server running on the DMZ server 192.168.2.5. There is a NAT in place for lab purposes but as the ASA performs NAT before ACL the rule will read source: 10.10.10.144, destination: 192.168.2.5 and port: 8000.

The current Go application will save the Terraform output to the ASA Terraform project main.tf file. This will then need to be applied manually by running terraform apply.

Check if traffic is permitted to pass
Source: 10.10.10.144
Destination: 192.168.2.5
Port: 8000

Create the Rule on the Go application

Check the Terraform file in the asaterraform repo for the new configuration.

Run terraform apply to have the new rule added.

Rerun the ASA packet-tracer command to ensure that the traffic is permitted.

Test the web server from the source 10.10.10.144, I now have access without making any Cisco ASA CLI changes.

Leave a Comment

Your email address will not be published. Required fields are marked *