OpenVPN Inline Certs

From Lolly's Wiki
Revision as of 10:08, 30 May 2013 by Lollypop (talk | contribs) (Die Seite wurde neu angelegt: „Kategorie:OpenVPN To get an OpenVPN-Configuration in one file you can inline all referred files like this: <pre> # nawk ' /^(tls-auth|ca|cert|key)/ { type=$…“)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Kategorie:OpenVPN To get an OpenVPN-Configuration in one file you can inline all referred files like this:

# nawk '
/^(tls-auth|ca|cert|key)/ {
  type=$1;
  file=$2;
  # for tls-auth we need the key-direction
  if(type=="tls-auth")print "key-direction",$3;
  print "<"type">";
  while(getline tlsauth<file)
    print tlsauth;
  close(file);
  print "</"type">";
  next;
}
{
  # All other lines are printed as they are
  print;
}' connection.ovpn