24 lines
465 B
Plaintext
24 lines
465 B
Plaintext
# Virtual Interface Configuration
|
|
{
|
|
my $OUT='';
|
|
my $protocol = ${'openvpn-bridge'}{protocol} || 'udp';
|
|
my $port='';
|
|
if ($protocol eq 'udp'){
|
|
$port = ${'openvpn-bridge'}{UDPPort} || '1194';
|
|
}
|
|
if ($protocol eq 'tcp'){
|
|
$port = ${'openvpn-bridge'}{TCPPort} || '1194';
|
|
$protocol = 'tcp-server';
|
|
}
|
|
my $tapIf = ${'openvpn-bridge'}{tapIf} || 'tap0';
|
|
|
|
$OUT .=<<"HERE";
|
|
|
|
port $port
|
|
proto $protocol
|
|
dev $tapIf
|
|
|
|
HERE
|
|
|
|
}
|