import re


def get_vpn_ports(vpn_file):
    """Get VPN ports from ovpn file"""
    with open(vpn_file, 'r') as fh:
        contents = fh.read()
    return re.findall(r"^remote .+? (\d+)", contents, re.MULTILINE)