[arm-allstar] Inbound connections with VPN

David McGough kb4fxc at inttek.net
Thu Aug 1 02:03:50 EDT 2019


Hi Jeff,

This is probably a routing issue with linux.  There are several solutions
for this scenario, including using source-routing or just dumping all
traffic across the VPN once it's up and running. Most of the time I prefer
to just dump all Internet-bound traffic across the VPN.

To set this up, you can use the "up" command in the openvpn config file
to run a custom script after the tunnel is established.  A very basic
routing script would look something like:

#---------------------------------------------------------------------------
#/bin/bash

### KB4FXC --- OpenVPN "up" script
###
### Determine the default gateway
export IP=$(/sbin/ip route | awk '/default/ { print $3 }')

if [ -n "$remote_1" ] ; then
	route add -host "$remote_1" gw $IP
fi

if [ -n "$remote_2" ] ; then
	route add -host "$remote_2" gw $IP
fi

if [ -n "$remote_3" ] ; then
	route add -host "$remote_3" gw $IP
fi

route add -net 0.0.0.0/1 gw $5
route add -net 128.0.0.0/1 gw $5

exit 0

#---------------------------------------------------------------------------


I'll be glad to assist further, if needed.

73, David KB4FXC



On Wed, 31 Jul 2019, "Jeff Karpinski via ARM-allstar" wrote:

> Got a node built that will be deployed at a repeater site where VPN 
must be used. Got OpenVPN working just fine and I can make outbound 
connections with no issues. I can't however make connections inbound *to* 
the node. Has anyone found the secret sauce for the OpenVPN config to 
pass inbound UDP connections?
> _______________________________________________
> 
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> 



More information about the ARM-allstar mailing list