Commit 4ab4468f authored by Rafael Monnerat's avatar Rafael Monnerat

local-frontend: Initiall Proof of concept

parent a63a468a
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
roles:
- { role: package, package_name: radvd, package_state: present }
- { role: package, package_name: dnsmasq, package_state: present }
###############################################################################
#ZONE INTERFACE BROADCAST OPTIONS
net eth0 detect routeback
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
###############################################################################
#SOURCE DEST POLICY LOG LEVEL LIMIT:BURST
$FW net ACCEPT
net all ACCEPT
# The FOLLOWING POLICY MUST BE LAST
all all ACCEPT
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
##############################################################################
#ZONE TYPE OPTIONS IN OUT
# OPTIONS OPTIONS
fw firewall
net ipv4
#LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE
- name: Copy files
copy: src={{ item }} dest=/etc/shorewall/{{ item }} mode=660
with_items:
- interfaces
- policy
- zones
- name: copy templates
template: src={{ item }} dest=/etc/shorewall/{{ item }} mode=660
with_items:
- masq
- rules
#INTERFACE SOURCE ADDRESS PROTO PORT
eth0:{{ local_ipv4 }} 0.0.0.0/0 {{ public_ipv4 }} tcp 4443
eth0:{{ local_ipv4 }} 0.0.0.0/0 {{ public_ipv4 }} tcp 8080
#############################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/
# PORT PORT(S) DEST LIMIT GROUP
Ping/ACCEPT net $FW
# ssh (the most important thing...)
ACCEPT net $FW tcp 22
ACCEPT net $FW tcp 1194
# Access local slapos services
# slappart16
DNAT net $FW:{{ local_ipv4 }}:4443 tcp 443
DNAT net $FW:{{ local_ipv4 }}:8080 tcp 80
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
vars_prompt:
- name: "local_ipv4"
prompt: "IPv4 of apache"
private: no
- name: "public_ipv4"
prompt: "IPv4 on eth0"
private: no
roles:
- shorewall
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment