All pastes #30828 Raw Edit

Mine

public text v1 · immutable
#30828 ·published 2005-11-24 02:04 UTC
rendered paste body
#!/bin/sh
#
# Firewall
#
cmd="/sbin/ipfw add"
/sbin/ipfw -f flush

# Basic Firewall
$cmd 001 allow ip from any to any via lo0

# Standard Ports (100)
$cmd 101 allow tcp from any to any 21 setup
$cmd 102 allow tcp from any to any 22 setup
$cmd 103 allow tcp from any to any 25 setup
$cmd 104 allow udp from any to any 53 setup
$cmd 105 allow tcp from any to any 53 setup
$cmd 106 allow tcp from any to any 80 setup
$cmd 107 allow tcp from any to any 110 setup
$cmd 108 allow tcp from any to any 143 setup
$cmd 109 allow tcp from any to any 443 setup
$cmd 110 allow tcp from any to any 465 setup
$cmd 111 allow tcp from any to any 783 setup
$cmd 112 allow tcp from any to any 993 setup
$cmd 113 allow tcp from any to any 995 setup
$cmd 114 allow tcp from any to any 3306 setup

# cPanel & WHM Ports (200)
$cmd 201 allow tcp from any to any 2082 setup
$cmd 202 allow tcp from any to any 2083 setup
$cmd 203 allow tcp from any to any 2086 setup
$cmd 204 allow tcp from any to any 2087 setup
$cmd 205 allow tcp from any to any 2095 setup
$cmd 206 allow tcp from any to any 2096 setup

# Additional cPanel Ports (300)
$cmd 300 allow ip from any to any 873 setup
$cmd 301 allow ip from any to any 2089 setup
$cmd 302 allow ip from any to cpanel.net setup
$cmd 303 allow ip from any to rdate.cpanel.net setup
$cmd 304 allow ip from any to rsync.cpanel.net setup
$cmd 305 allow ip from any to layer1.cpanel.net setup
$cmd 306 allow ip from any to layer2.cpanel.net setup
$cmd 307 allow ip from any to httpupdate.cpanel.net setup

# Block specific IP's (400)

# Reject Everything (500)
$cmd 500 deny ip from any to any