Forcing interface ?

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
rouge
OpenVpn Newbie
Posts: 1
Joined: Mon Mar 02, 2015 1:38 pm

Forcing interface ?

Post by rouge » Mon Mar 02, 2015 1:57 pm

I have a linux ubuntu 14.04 gateway.
On this gateway, there are many VPN installed as clients(and there will be much more).
Some of them, like the openvpn client, are using a ppp interface.
On some of the ppp interfaces, i'm doing iptabbles MASQUERADING, on some others, i'm only routing my LAN's hosts other the VPN.

i'm looking for some trick/option to force the number of the ppp interface used by openvpn (it mean "Client1" wille use ppp1 even if ppp0 doesn't exist) ?

All my VPNs are working fine, but sometimes, when restarting them, they change their interface number, and my iptables firewalls doesn't match anymore...
(i know i can work around this with some shell script to change my iptables rules, but my brain would be more happy with some statically dedicated interfaces)

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Forcing interface ?

Post by Traffic » Tue Mar 03, 2015 9:12 am

Openvpn uses TAP Driver .. interfaces can be named tun0-99

See --dev tapX | tunX in The Manual v23x

Post Reply