Skip to content

Instantly share code, notes, and snippets.

@alsunseri
Created January 22, 2020 17:40
Show Gist options
  • Save alsunseri/5da464f7ca7c19186ae6e88c1d23b8f9 to your computer and use it in GitHub Desktop.
Save alsunseri/5da464f7ca7c19186ae6e88c1d23b8f9 to your computer and use it in GitHub Desktop.
Sed commands for .ovpn config - creates .ca .cert and .key files from from monolithing .ovpn - from Nathan House / stationx
### from nathan house at stationx from the cyber sec. course on anonymity etc.
sed '1,/<ca>/d;/<\/ca>/,$d' myvpn_account.ovpn > ca.crt
sed '1,/<cert>/d;/<\/cert>/,$d' myvpn_account.ovpn > client.crt
sed '1,/<key>/d;/<\/key>/,$d' myvpn_account.ovpn > client.key
sed '1,/<tls-auth>/d;/<\/tls-auth>/,$d' myvpn_account.ovpn > ta.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment