Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow user to specify netmask

  • Loading branch information...
commit 748eca96e86937d557c7bd771208e41b6f3ba06e 1 parent 3f713ac
Greg Brockman authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 server.erb
View
12 server.erb
@@ -9,12 +9,12 @@ port <%= @port %>
proto udp
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 %>
+server <%= @base_ip %> <%= @base_netmask %>
+<% @subnets.each do |net| %>
+route <%= net[:base_ip] %> <%= net[:netmask] %>
+push "route <%= net[:base_ip] %> <%= net[:netmask] %>"<% end %>
+<% @bridgednets.each do |net| %>
+push "route <%= net[:base_ip] %> <%= net[:netmask] %>"<% end %>
# Drop privileges to user/group nobody
user <%= @user %>
Please sign in to comment.
Something went wrong with that request. Please try again.