openwrt / openwrt/packages

openvpn-openssl Enable "iproute" option in OpenVPN make configuration

Open
#22,044 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Hey Guys,

I recently run in a problem with the OpenVPN-OpenSSL package. I had to do some advanced routing to do: The routes that are pushed from a commercial VPN provider should be moved to a special routing table on the OpenVPN-Client side. The client is here my OpenWRT router. There is no working method to do that on standard OpenWRT.

I found out that it is possible to override the “ip”-command that OpenVPN is using to set the routing rules. With the “iproute”-option you can specify a program or script to act as the ip command. In a forum I found a great little example script that uses this option:

#!/bin/bash
if [ "$1" == "route" ] ; then
    ip $@ table vpn
else
    ip $@
fi

In the client configuration it is only necessary to point to the script:

iproute /etc/openvpn/vpn-iproute.sh

Unfortunately, the “iproute”-option needs to be set on compile time through the configure script. This option is currently not enabled in the openvpn-openssl package. It would be great if you could enable it. It would really help to do more advanced routing. Scripts that are using this method are very robust because changes that are coming from the server side are getting always implemented in the right way.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the openvpn-openssl package's make configuration and inspect how configure options are enabled. Confirm that the iproute option is passed during the build, then verify the package builds successfully with the option enabled.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, networking
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.