Site-to-site configuration
For site-to-site configurations, in addition to configuring the interface as tap device, you must also indicate the subnet mask for the local address that is specified. To configure an OpenVPN site-to-site interface as a tap device, use the configuration shown in the following example.
Configuration options related to tap devices for site-to-site interfaces
interfaces {
openvpn if_name{
device-type
tap
local-address ipv4 {
subnet-mask mask
}
}
}
- device-type tap: This argument tells OpenVPN that the tunnel is to be used as a tap device and operate on Layer 2 traffic. This configuration is required on both ends of the OpenVPN tunnel.
- local-address: This argument is the IP address at the local end of the OpenVPN tunnel.
- subnet-mask: This argument is the subnet mask for local-address (for example, 255.255.255.0).