Skip to content

Commit

Permalink
ipchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-kodra committed Jul 5, 2016
1 parent 4478df6 commit 98dbaf5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/openvpn/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ openvpn_port: "443"
openvpn_protocol: "tcp"

# It assume that the subnet mask is /24
openvpn_network: "172.18.0.0"
openvpn_network: "172.16.0.0"

# Private Subnet(s) in VPC that you want to reach through OPENVPN, it assume that the subnet #mask is /24
private_networks:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/openvpn/tasks/iptables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
register: masquerade_done

- name: Add IP adress MASQUERADE rule
command: /sbin/iptables -I FORWARD -s 172.18.0.0/16 -j ACCEPT
command: /sbin/iptables -I FORWARD -s 172.16.0.0/16 -j ACCEPT

- name: perfomss NAT readdressingme
command: /sbin/iptables -I FORWARD -s 172.18.0.0/16 -j ACCEPT
command: /sbin/iptables -I FORWARD -s 172.16.0.0/16 -j ACCEPT

- name: allow port 443
command: /sbin/iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/openvpn/templates/etc_dnsmasq.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ bogus-priv

# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified address (remember to include 127.0.0.1 if you use this.)
listen-address=127.0.0.1,172.18.0.1
listen-address=127.0.0.1,172.16.0.1
bind-interfaces
4 changes: 2 additions & 2 deletions ansible/roles/openvpn/templates/etc_openvpn_server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cert server.crt
key server.key # This file should be kept secret
dh dh{{ openvpn_key_size }}.pem
#VPN subnet for OpenVPN to draw client addresses from.
server 172.18.0.0 255.255.255.0
server 172.16.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt

#Push routes to the client to allow it to reach other
Expand All @@ -28,7 +28,7 @@ push "route {{ secure }}"
;push "redirect-gateway def1"

# For name resolution
;push "dhcp-option DNS 172.18.0.1"
;push "dhcp-option DNS 172.16.0.1"
client-to-client
keepalive 10 120
tls-auth ta.key 0 # This file is secret
Expand Down

0 comments on commit 98dbaf5

Please sign in to comment.