Permalink
Browse files

Add routing configuration to server template

  • Loading branch information...
1 parent 66eb5a7 commit 3f713ac3deecb2707cfa4dbafb288404af181973 Greg Brockman committed Nov 7, 2010
Showing with 12 additions and 1 deletion.
  1. +4 −0 foocorp.config.yaml
  2. +8 −1 server.erb
View
@@ -1,5 +1,9 @@
:server:
:base_ip: 10.10.10.0
+ :bridgednets: # real networks to bridge via the VPN server
+ - 172.16.0.0
+ :subnets: # subnets that exist only on the VPN
+ - 10.10.11.0
:user: nobody
:group: nogroup
:root: /root/openvpn
View
@@ -8,8 +8,13 @@ local <%= @host %>
port <%= @port %>
proto udp
-dev tun
+dev tun0
server <%= @base_ip %> 255.255.255.0
+<% @subnets.each do |ip| %>
+route <%= ip %> 255.255.255.0
+push "route <%= ip %> 255.255.255.0"<% end %>
+<% @bridgednets.each do |ip| %>
+push "route <%= ip %> 255.255.255.0"<% end %>
# Drop privileges to user/group nobody
user <%= @user %>
@@ -31,3 +36,5 @@ persist-tun
persist-key
tls-auth <%= @root %>/keys/ta.key 0
+
+client-config-dir <%= @root %>/ccd

0 comments on commit 3f713ac

Please sign in to comment.