Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
822 stars 188 forks source link

OpenVPN Desktop Icon #631

Open JamesDynasty opened 3 years ago

JamesDynasty commented 3 years ago

Is there any way to add a desktop icon for connecting to OpenVPN?

Like-wise, what's the best way to include the OpenVPN certificate files with the build image?

Thanks!

Doncuppjr commented 3 years ago

Have a look at https://github.com/Thinstation/thinstation/tree/6.2-Stable/ts/build/packages/openvpn/build/extra/etc/init.d for some clues about how the openvpn package works. If you want a toggle, you could make a script, and add a /lib/menu/ file that will execute your script.

JamesDynasty commented 3 years ago

Hey @Doncuppjr,

Thanks for the direction! I was able to get a script in place to make the toggle and what-not.

Now my issue is when trying to connect to OpenVPN I get a permission error: "Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)"

How can I go about ensuring this has the appropriate permissions when running?

Thanks.

Doncuppjr commented 3 years ago

Try with an allmodules build. Might be some extra modules are needed.

JamesDynasty commented 3 years ago

Allmodules still gives the same error.

JamesDynasty commented 3 years ago

Using Ctrl+Alt+F2 and logging in as root allows me to connect as expected.

Doncuppjr commented 3 years ago

Could be a group thing. A regular user might not have perms to start a tunnel. You could possibly set up sudo to help out here.

JamesDynasty commented 3 years ago

I wasn't able to find any sort of guide on how to setup sudo in Thinstation. Do have somewhere for me to start with this?

Alternatively, would it be easier/possible to just give the tsuser full privileges?

Really appreciate all the help! Thanks again.

Doncuppjr commented 3 years ago

Sudo is not that wildly different than anywhere else. Include the sudo package, and include a sudoers.d file for the script that toggles openvpn.

You could just run as root everywhere of course, but people frown on that.

JamesDynasty commented 3 years ago

I realized I was in an outdated version of DevStation and decided to update before continuing. After updating my DevStation cannot see it's wifi card. I ended up reinstalling the version I had originally installed and it's still not detecting the card. I even installed windows and confirmed the card is working there, just not in my DevStation anymore. I know when I first installed it I didn't have to do anything, it just immediately popped up and prompted me to connect to wifi.

Doncuppjr commented 3 years ago

Interesting. Which network card do you have? output of ifconfig?

JamesDynasty commented 3 years ago

ifconfig doesn't show any wlan interfaces.

It's a laptop with an internal card: Realtek RTL8821CE 802.11b/g/n/ac

Doncuppjr commented 3 years ago

Something was wrong with the module. I think it's fixed now. Try updating DevStation.

JamesDynasty commented 3 years ago

Wifi is now working. Thanks! Hopefully now I can get my OpenVPN up and running properly.

JamesDynasty commented 3 years ago

Now it looks like the wifi on the actual thinstation build image isn't working. Made sure all wireless options are enabled and tried with allmodules.

Thanks.

Thinstation commented 3 years ago

I pushed fixed to git.

On Fri, Feb 19, 2021 at 1:51 PM JamesDynasty notifications@github.com wrote:

Now it looks like the wifi on the actual thinstation build image isn't working. Made sure all wireless options are enabled and tried with allmodules.

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/631#issuecomment-782385522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47RT53T2K2VQQSS5WK3S73MNXANCNFSM4XXU4OCA .

JamesDynasty commented 3 years ago

I updated the DevStation and rebuild the image, but I'm still facing the same issue. It didn't look like the DevStation actually updated.

Thinstation commented 3 years ago

It’s not the DevStation that needs to be updated now. The chroot needs a factory reset

On Fri, Feb 19, 2021 at 2:32 PM JamesDynasty notifications@github.com wrote:

I updated the DevStation and rebuild the image, but I'm still facing the same issue. It didn't look like the DevStation actually updated.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/631#issuecomment-782417469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47QKFRKK5LYI2XLJBCLS73RIPANCNFSM4XXU4OCA .

JamesDynasty commented 3 years ago

Gotcha! I factory reset and rebuilt out my configurations. I was able to add tsuser to the suoders for executing OpenVPN and my script works beautifully. Thanks for all your help!