Jump to content
Not connected, Your IP: 18.222.67.251
JCBproductions

Hummingbird help: root, run on startup, routes

Recommended Posts

Posted ... (edited)

Greetings! I've been using Ubuntu for 10 months so forgive me for the Readme not being enough for me to get Hummingbird working. My Eddie gui software is unstable this week and I would like to switch to Hummingbird. I have hit a wall on self-solving 4 problems.

Problem 1: can't run Hummingbird with sudo
I installed the binary into ~/.local/bin and made it executable. After a restart I can run "hummingbird" from anywhere, then it complains about needing root. Ok, so I run "sudo hummingbird" and then it complains "hummingbird: command not found". Same command not found results for "./hummingbird".

Problem 2: Hummingbird needs to run as root
Everything I've read about enabling root says don't do it lightly, so I haven't set up a root password yet. I used chmod to change the owner of ~/.local/bin/hummingbird to root. I'm hoping a solution to the next question obviates the nuclear option of activating root and always keeping a root tab open to run Hummingbird?

Problem 3: automate Hummingbird to run on startup
The options for how to automate this are myriad and I'm overwhelmed right now. Another user on this forum set this up with systemd. Is anyone willing to share the steps they went through to automate launching Hummingbird? 

Problem 4: Routes 
The backend my professional org website uses hates all VPNs, so in Eddie I use routing to avoid having to turn off my VPN on a website I have to use frequently. I also use routes for Wikipedia to avoid accidentally getting thrown in Wikipedia jail for editing while on a VPN. How do I set up routes in Hummingbird? 

Thank you for edifying a Linux tyro (Ubuntu 20.04.1) 

Edited ... by JCBproductions
Specifying Linux version and flavor

Share this post


Link to post
2 hours ago, JCBproductions said:

Problem 1: can't run Hummingbird with sudo
I installed the binary into ~/.local/bin and made it executable. After a restart I can run "hummingbird" from anywhere, then it complains about needing root. Ok, so I run "sudo hummingbird" and then it complains "hummingbird: command not found". Same command not found results for "./hummingbird".


sudo substitutes a user and does a command while retaining your environment variables. $PATH might contain something like ~/.local/bin as one of the paths to look for binaries, but since you're effectively root when sudoing, it looks in /root/.local/bin, which does not contain hummingbird. Ergo, you get "command not found".
The solution is to move that binary to /usr/bin/.
 
2 hours ago, JCBproductions said:

Problem 2: Hummingbird needs to run as root
Everything I've read about enabling root says don't do it lightly, so I haven't set up a root password yet. I used chmod to change the owner of ~/.local/bin/hummingbird to root. I'm hoping a solution to the next question obviates the nuclear option of activating root and always keeping a root tab open to run Hummingbird?


And it's true, do not enable root without some serious thought whether you really need it, and there are very few cases of need. You did the right thing, or rather, not doing it was right.
The solution is to use sudo. It elevates the privileges for one command only and is the safest option. Do not keep a root tab open just for Hummingbird.
 
2 hours ago, JCBproductions said:

Problem 3: automate Hummingbird to run on startup
The options for how to automate this are myriad and I'm overwhelmed right now. Another user on this forum set this up with systemd. Is anyone willing to share the steps they went through to automate launching Hummingbird? 


Actually, there is only one universal option, and it is systemd. You should probably go back to the thread you found it in and try doing the steps there. Don't waste your time thinking about anything else for now.
 
2 hours ago, JCBproductions said:

Problem 4: Routes 
The backend my professional org website uses hates all VPNs, so in Eddie I use routing to avoid having to turn off my VPN on a website I have to use frequently. I also use routes for Wikipedia to avoid accidentally getting thrown in Wikipedia jail for editing while on a VPN. How do I set up routes in Hummingbird? 


Indirectly through the config file. Hummingbird, or rather OpenVPN, applies route directives found there. Be advised that this only works with IPv4 addresses.
For example, to route an IP like 1.1.1.1 through the ISP connection, add this to the config file:

route 1.1.1.1 255.255.255.255 x.x.x.x

x.x.x.x is your local IP gateway address. Normally you'd enter net_gateway to let OpenVPN enter it itself, but OpenVPN3 and by extension Hummingbird don't know that directive. So you need to fill it yourself. Enter this command to get that local gateway IP:

ip r|grep default|cut -d " " -f3

.

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Quote

Actually, there is only one universal option, and it is systemd. You should probably go back to the thread you found it in and try doing the steps there. Don't waste your time thinking about anything else for now.


Unfortunately for me, that thread's instructional steps were limited to the user saying they'd done it using systemd. 🙄 I'll take a shot at setting it up myself first then reconvene here if I hit another wall.

Thank you for answering the other questions!

Share this post


Link to post

Move the hummingbird binary to /usr/local/bin.
Paste this into an editor:

[Unit]
Description=Connect to VPN at startup
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/local/bin/hummingbird [arguments] /absolute/path/to/config/file.ovpn

[Install]
WantedBy=multi-user.target
Add the [arguments] in the ExecStart line you are running hummingbird with.
Edit the /path/… to your config file. If you left it in ~ or some directory in there, you'd have an easier time editing OpenVPN directives. The rights don't matter as ExecStart is executed as root.
Save the file as hummingbird.service, move it to /usr/lib/systemd/system.
Execute (sudo) systemctl daemon-reload.
Execute (sudo) systemctl start hummingbird.service.
Check its status using systemctl status hummingbird.service. If it's started, enable it at boot using (sudo) systemctl enable hummingbird.service.

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post

Hello!

You can now do that with Bluetit. Configuring Bluetit to connect during system bootstrap is a straightforward, very simple procedure, Furthermore, you will run a real daemon, and not a user process, therefore you have a higher security level. and you don't need a systemd unit that's questionable for a user process. Bluetit can start and connect during bootstrap of both systemd and SysV-style init based systems.

https://airvpn.org/forums/topic/48833-linux-airvpn-suite-100-released/

Kind regards
 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...