New BB Code [oconf] for OpenVPN config parsing.

All comments and questions related to the functionality of the OpenVPN web pages and forum should go here.
User avatar
ecrist
Forum Team
Posts: 209
Joined: Wed Nov 26, 2008 10:33 pm
Location: Minneapolis, MN
Contact:

New BB Code [oconf] for OpenVPN config parsing.

Postby ecrist » Fri Apr 22, 2016 3:17 pm

I've released a new BB code for the OpenVPN forum today that will help with pasting OpenVPN configuration files. There's more work I want to do to it, but v1.0 is released now. To use it, simply use the oconf= button in your new post editor.

The old way was to simple post a configuration:

# This is a comment
push "route 10.0.0.0 255.255.255.0" #My lan
server 10.3.0.0 255.255.255.0 #Vpn Lan
push "redirect-gateway def1"
push "dhcp-option DNS 123.123.220.220"
push "dhcp-option DNS 123.123.222.222"


;
;



dev tun0
proto udp
port xxxx
; there is a comment here, too
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
management localhost 5001

With oconf, you can add a title and configuration content So, use something like the following:

Code: Select all

[oconf=Server Config]# This is a comment
push "route 10.0.0.0 255.255.255.0" #My lan
server 10.3.0.0 255.255.255.0 #Vpn Lan
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"




;
;
;
;
;
;
;
;
;
;
;
;


dev tun0
proto udp
port xxxx
; there is a comment here, too
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
management localhost 5001[/oconf]


Which results in the following. You can click on the button in the title to switch between the parsed configuration and what the poster originally posted to the forum. Coming soon will be key word highlighting and line numbers.

Server Config
# This is a comment
push "route 10.0.0.0 255.255.255.0" #My lan
server 10.3.0.0 255.255.255.0 #Vpn Lan
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"




;
;
;
;
;
;
;
;
;
;
;
;


dev tun0
proto udp
port xxxx
; there is a comment here, too
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
management localhost 5001
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel Twitter: @ecrist
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

User avatar
Traffic
OpenVPN Protagonist
Posts: 4081
Joined: Sat Aug 09, 2014 11:24 am

Re: New BB Code [oconf] for OpenVPN config parsing.

Postby Traffic » Fri Apr 22, 2016 4:09 pm


    Nice 8-)

    I just hope people use these features :ugeek:

      For help with OpenVPN-CommunityEdition (including most routers)

      Please see:
      HOWTO: Request Help !

        Post Details:

        Code: Select all

        1.
        SERVER CONFIG:
        [oconf=server]
        server config file - public ip names and addresses removed
        [/oconf]

        2.
        CLIENT CONFIG:
        [oconf=client]
        client config file - public ip names and addresses removed
        [/oconf]

        3.
        SERVER LOG (--verb 4):
        [code]
        server log file (--verb 4) - public ip names and addresses removed
        [/code]

        4.
        CLIENT LOG (--verb 4):
        [code]
        client log file (--verb 4) - public ip names and addresses removed
        [/code]



      For help with OpenVPN-AccessServer See:
      https://forums.openvpn.net/viewforum.php?f=24

      Also, before you post, See:
      https://forums.openvpn.net/viewtopic.php?f=30&t=20733

    Kind regards.

Pippin
OpenVPN Expert
Posts: 238
Joined: Wed Jul 01, 2015 8:03 am

Re: New BB Code [oconf] for OpenVPN config parsing.

Postby Pippin » Fri Apr 22, 2016 6:32 pm

Nice indeed.

Traffic wrote:I just hope people read The rules and use these features :ugeek:

Keep your hopes up :mrgreen:

User avatar
ecrist
Forum Team
Posts: 209
Joined: Wed Nov 26, 2008 10:33 pm
Location: Minneapolis, MN
Contact:

Re: New BB Code [oconf] for OpenVPN config parsing.

Postby ecrist » Fri Apr 22, 2016 8:51 pm

I also plan on writing a log parser that will work similarly, which highlighting and more. :)
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel Twitter: @ecrist
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

User avatar
ecrist
Forum Team
Posts: 209
Joined: Wed Nov 26, 2008 10:33 pm
Location: Minneapolis, MN
Contact:

Re: New BB Code [oconf] for OpenVPN config parsing.

Postby ecrist » Sat Apr 23, 2016 1:04 am

So, I have no life and implemented the line numbering scheme. Parsing is next.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel Twitter: @ecrist
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

User avatar
ecrist
Forum Team
Posts: 209
Joined: Wed Nov 26, 2008 10:33 pm
Location: Minneapolis, MN
Contact:

Re: New BB Code [oconf] for OpenVPN config parsing.

Postby ecrist » Fri May 06, 2016 1:27 am

The oconf= BB code will now automatically strip inline certificate payload.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel Twitter: @ecrist
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN


Return to “Forum & Website Support”

Who is online

Users browsing this forum: Yến and 1 guest