Page 1 of 1

Forcing interface ?

Posted: Mon Mar 02, 2015 1:57 pm
by rouge
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)

Re: Forcing interface ?

Posted: Tue Mar 03, 2015 9:12 am
by Traffic
Openvpn uses TAP Driver .. interfaces can be named tun0-99

See --dev tapX | tunX in The Manual v23x