TurnKey Linux Virtual Appliance Library

Problem configuring webmin module manually

turnkey_1972's picture

I am trying to write a shell script to config an openvpn webmin module via command line but it's not working. I edit /usr/share/webmin/openvpn/config using sed. The changes are saved to the file, but when I load the module configuration in webmin, the changes do not show up. Am I not editing the right file? Everything I looked up points me to that file.

I wish I could see how TKL Mysql and similar appliances that install webmin modules do it.

Also, how does TKL OpenVPN sound? I want to replace my current openvpn server, so I figured TKL Core is a good starting point.

Liraz Siri's picture

TurnKey OpenVPN sounds terrific

For a while now I've been thinking that an OpenVPN appliance would make a great addition to the library. Unfortunately it didn't make the cut for the previous release batch but hopefully with your help we'll get it into the next.

Regarding your first question, don't touch anything in /usr/share. That goes against Debian Policy because a package upgrade could wipe your changes out. We configure webmin by tweaking files in /etc/webmin. For example here's how we configure Webmin to list on port 12321:

set ${WEBMIN_PORT:=12321}
sed --in-place "s/10000/$WEBMIN_PORT/g" /etc/webmin/miniserv.conf
Regarding your second question, TurnKey appliances install webmin modules via the package manager:
apt-get install webmin-mysql
dpkg -L webmin-mysql
/usr/share/webmin/modules/mysql.wbm.gz
There's an OpenVPN module for Webmin but unfortunately I'm not sure you'll be able to install it via the package manager yet, since its not in the list of packaged modules:
apt-cache search webmin-|grep -i vpn
webmin-ipsec - Webmin module - IPsec VPN Configuration
webmin-pptp-client - Webmin module - PPTP VPN Client
webmin-pptp-server - Webmin module - PPTP VPN Server
We package Webmin ourselves though so if you make a prototype we'll take care of that in the next release. In the meantime just install it manually.

Stas Grishin's picture

Thanks you so much

Thanks for the help. I can now install the webmin openvpn module and configure it via command line. I just need to put everything together into one script that will turn TKL Core into an openvpn appliance.

My problem now is how to get openvpn working. I can get it installed, but after following many tuturials and reading help files online, I still cannot get a server working that I can connect to. I have not had to setup openvpn for a long time. I think the installation is good, but until I can get a working server, I find it hard to say it is ready.

Anyone know how to get a working server using the webmin openvpn module?

Anyway, I will try to get a complete script together tomorrow and will do some more testing. If I can figure out how to turn this into a tklpatch, I will do that too this week.

I love the whole concept of virtual machines and how Turnkey Linux takes advantage of the technology. Thanks so much for this great system and for all of the help.

Liraz, can the information you gave above be added to the development section? Also, I was able to create my own webmin-openvpn debian package. Do you prefer I auto-generate it in a script file? Or would you rather host it on the turnkey repository?

http://doxfer.com/Webmin/ModuleDevelopment#Module_Packaging

Guest's picture

Installing webmin modules from command line

I know this is an old thread, but I am currently working on a similar solution based on Ubuntu using the Ubuntu Customization Kit (https://github.com/March-hare/Operator-Distribution).  I found that the usermin module has a script for this that was easily customized for installing webmin modules.  I have added it to my repository (https://github.com/March-hare/Operator-Distribution/blob/master/uck/inst...).

You can see examples of how I script the installation here: https://github.com/March-hare/Operator-Distribution/blob/master/uck/cust...

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)