Created
September 17, 2012 14:56
-
-
Save raecoo/3737845 to your computer and use it in GitHub Desktop.
openvpn + shorewall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local domain | |
port 7878 | |
proto udp | |
dev tun | |
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt | |
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt | |
key /etc/openvpn/easy-rsa/2.0/keys/server.key | |
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem | |
ifconfig-pool-persist ipp.txt | |
server 10.168.1.0 255.255.255.0 | |
push "redirect-gateway" | |
push "dhcp-option DNS 8.8.8.8" | |
push "dhcp-option DNS 8.8.4.4" | |
client-to-client | |
;duplicate-cn | |
keepalive 20 60 | |
comp-lzo | |
max-clients 50 | |
persist-key | |
persist-tun | |
status /etc/openvpn/openvpn-status.log | |
log-append /etc/openvpn/openvpn.log | |
verb 3 | |
mute 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ZONE INTERFACE BROADCAST OPTIONS | |
net eth0 detect dhcp,routefilter,tcpflags | |
vpn tun0 detect dhcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eth0 10.168.1.0/24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SOURCE DEST POLICY LOG LIMIT:BURST | |
$FW net ACCEPT | |
vpn all ACCEPT | |
all all REJECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DNS(ACCEPT) loc $FW | |
ACCEPT $FW net icmp | |
ACCEPT $FW net tcp 22,80,443 | |
ACCEPT loc fw icmp | |
ACCEPT loc net tcp 22,80,443 | |
ACCEPT net fw tcp 22,80,443 | |
ACCEPT all vpn all | |
Ping/ACCEPT net $FW | |
Trcrt/ACCEPT net $FW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# | |
# Shorewall Version 4 -- /etc/shorewall/shorewall.conf | |
# | |
# For information about the settings in this file, type "man shorewall.conf" | |
# | |
# Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html | |
############################################################################### | |
# S T A R T U P E N A B L E D | |
############################################################################### | |
STARTUP_ENABLED=Yes | |
############################################################################### | |
# V E R B O S I T Y | |
############################################################################### | |
VERBOSITY=1 | |
############################################################################### | |
# L O G G I N G | |
############################################################################### | |
LOGFILE=/var/log/messages | |
STARTUP_LOG=/var/log/shorewall-init.log | |
LOG_VERBOSITY=2 | |
LOGFORMAT="Shorewall:%s:%s:" | |
LOGTAGONLY=No | |
LOGRATE= | |
LOGBURST= | |
LOGALLNEW= | |
BLACKLIST_LOGLEVEL= | |
MACLIST_LOG_LEVEL=info | |
TCP_FLAGS_LOG_LEVEL=info | |
SMURF_LOG_LEVEL=info | |
LOG_MARTIANS=Yes | |
############################################################################### | |
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S | |
############################################################################### | |
IPTABLES= | |
IP= | |
TC= | |
IPSET= | |
PERL=/usr/bin/perl | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin | |
SHOREWALL_SHELL=/bin/sh | |
SUBSYSLOCK="" | |
MODULESDIR= | |
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall | |
RESTOREFILE= | |
IPSECFILE=zones | |
LOCKFILE= | |
############################################################################### | |
# D E F A U L T A C T I O N S / M A C R O S | |
############################################################################### | |
DROP_DEFAULT="Drop" | |
REJECT_DEFAULT="Reject" | |
ACCEPT_DEFAULT="none" | |
QUEUE_DEFAULT="none" | |
NFQUEUE_DEFAULT="none" | |
############################################################################### | |
# R S H / R C P C O M M A N D S | |
############################################################################### | |
RSH_COMMAND='ssh ${root}@${system} ${command}' | |
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' | |
############################################################################### | |
# F I R E W A L L O P T I O N S | |
############################################################################### | |
IP_FORWARDING=On | |
ADD_IP_ALIASES=No | |
ADD_SNAT_ALIASES=No | |
RETAIN_ALIASES=No | |
TC_ENABLED=Internal | |
TC_EXPERT=No | |
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2" | |
CLEAR_TC=Yes | |
MARK_IN_FORWARD_CHAIN=No | |
CLAMPMSS=No | |
ROUTE_FILTER=Yes | |
DETECT_DNAT_IPADDRS=No | |
MUTEX_TIMEOUT=60 | |
ADMINISABSENTMINDED=Yes | |
BLACKLISTNEWONLY=Yes | |
DELAYBLACKLISTLOAD=No | |
MODULE_SUFFIX=ko | |
DISABLE_IPV6=No | |
BRIDGING=No | |
DYNAMIC_ZONES=No | |
PKTTYPE=Yes | |
NULL_ROUTE_RFC1918=No | |
MACLIST_TABLE=filter | |
MACLIST_TTL= | |
SAVE_IPSETS=No | |
MAPOLDACTIONS=No | |
FASTACCEPT=No | |
IMPLICIT_CONTINUE=No | |
HIGH_ROUTE_MARKS=No | |
USE_ACTIONS=Yes | |
OPTIMIZE=0 | |
EXPORTPARAMS=Yes | |
EXPAND_POLICIES=Yes | |
KEEP_RT_TABLES=No | |
DELETE_THEN_ADD=Yes | |
MULTICAST=No | |
DONT_LOAD= | |
AUTO_COMMENT=Yes | |
MANGLE_ENABLED=Yes | |
USE_DEFAULT_RT=No | |
RESTORE_DEFAULT_ROUTE=Yes | |
AUTOMAKE=No | |
WIDE_TC_MARKS=No | |
TRACK_PROVIDERS=No | |
ZONE2ZONE=2 | |
ACCOUNTING=Yes | |
DYNAMIC_BLACKLIST=Yes | |
OPTIMIZE_ACCOUNTING=No | |
LOAD_HELPERS_ONLY=No | |
REQUIRE_INTERFACE=No | |
FORWARD_CLEAR_MARK=Yes | |
############################################################################### | |
# P A C K E T D I S P O S I T I O N | |
############################################################################### | |
BLACKLIST_DISPOSITION=DROP | |
MACLIST_DISPOSITION=REJECT | |
TCP_FLAGS_DISPOSITION=DROP | |
#LAST LINE -- DO NOT REMOVE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#TYPE ZONE GATEWAY GATEWAY ZONE | |
generic:udp:7878 net 0.0.0.0/0 vpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fw firewall | |
net ipv4 | |
vpn ipv4 | |
loc ipv4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment