소개
이 문서에서는 VPN 연결에서 Microsoft Office 365(Microsoft Teams 포함) 및 Cisco Webex로 향하는 트래픽을 제외하기 위한 설정으로 ASA(Adaptive Security Appliance)를 구성하는 방법에 대해 설명합니다.또한 네트워크 주소 제외 및 이를 지원하는 AnyConnect 클라이언트에 대한 동적(FQDN(정규화된 도메인 이름) 기반 제외 사항을 통합합니다.
스플릿 터널링
터널에서 제외할 지정된 IPv4 및 IPv6 대상 목록을 "제외"하도록 ASA를 구성해야 합니다.안타깝게도 주소 목록은 동적이며 잠재적으로 변경될 수 있습니다.Python 스크립트의 구성 섹션 및 목록을 검색하고 샘플 컨피그레이션을 생성하는 데 사용할 수 있는 온라인 Python REPL(read-eval-print loop)에 대한 링크를 참조하십시오.
동적 스플릿 터널링
스플릿 제외 네트워크 주소 목록 외에도 Windows 및 Mac용 AnyConnect 4.6에 동적 스플릿 터널링이 추가되었습니다.동적 스플릿 터널링은 FQDN을 사용하여 연결을 터널을 통과할지 여부를 결정합니다.또한 python 스크립트는 맞춤형 AnyConnect 특성에 추가할 엔드포인트의 FQDN을 결정합니다.
구성
이 스크립트를 Python 3 REPL에서 실행하거나 https://repl.it/@ministryofjay/AnyConnectO365DynamicExclude과 같은 공용 REPL 환경에서 실행합니다.
import urllib.request
import uuid
import json
import re
def print_acl_lines(acl_name, ips, section_comment):
slash_to_mask = (
"0.0.0.0",
"128.0.0.0",
"192.0.0.0",
"224.0.0.0",
"240.0.0.0",
"248.0.0.0",
"252.0.0.0",
"254.0.0.0",
"255.0.0.0",
"255.128.0.0",
"255.192.0.0",
"255.224.0.0",
"255.240.0.0",
"255.248.0.0",
"255.252.0.0",
"255.254.0.0",
"255.255.0.0",
"255.255.128.0",
"255.255.192.0",
"255.255.224.0",
"255.255.240.0",
"255.255.248.0",
"255.255.252.0",
"255.255.254.0",
"255.255.255.0",
"255.255.255.128",
"255.255.255.192",
"255.255.255.224",
"255.255.255.240",
"255.255.255.248",
"255.255.255.252",
"255.255.255.254",
"255.255.255.255",
)
print(
"access-list {acl_name} remark {comment}".format(
acl_name=acl_name, comment=section_comment
)
)
for ip in sorted(ips):
if ":" in ip:
# IPv6 address
print(
"access-list {acl_name} extended permit ip {ip} any6".format(
acl_name=acl_name, ip=ip
)
)
else:
# IPv4 address. Convert to a mask
addr, slash = ip.split("/")
slash_mask = slash_to_mask[int(slash)]
print(
"access-list {acl_name} extended permit ip {addr} {mask} any4".format(
acl_name=acl_name, addr=addr, mask=slash_mask
)
)
# Fetch the current endpoints for O365
http_res = urllib.request.urlopen(
url="https://endpoints.office.com/endpoints/worldwide?clientrequestid={}".format(
uuid.uuid4()
)
)
res = json.loads(http_res.read())
o365_ips = set()
o365_fqdns = set()
for service in res:
if service["category"] == "Optimize":
for ip in service.get("ips", []):
o365_ips.add(ip)
for fqdn in service.get("urls", []):
o365_fqdns.add(fqdn)
# Generate an acl for split excluding For instance
print("##### Step 1: Create an access-list to include the split-exclude networks\n")
acl_name = "ExcludeSass"
# O365 networks
print_acl_lines(
acl_name=acl_name,
ips=o365_ips,
section_comment="v4 and v6 networks for Microsoft Office 365",
)
# Microsoft Teams
# https://docs.microsoft.com/en-us/office365/enterprise/office-365-vpn-implement-split-tunnel#configuring-and-securing-teams-media-traffic
print_acl_lines(
acl_name=acl_name,
ips=["13.107.60.1/32"],
section_comment="v4 address for Microsoft Teams"
)
# Cisco Webex - Per https://help.webex.com/en-us/WBX000028782/Network-Requirements-for-Webex-Teams-Services
webex_ips = [
"64.68.96.0/19",
"66.114.160.0/20",
"66.163.32.0/19",
"170.133.128.0/18",
"173.39.224.0/19",
"173.243.0.0/20",
"207.182.160.0/19",
"209.197.192.0/19",
"216.151.128.0/19",
"114.29.192.0/19",
"210.4.192.0/20",
"69.26.176.0/20",
"62.109.192.0/18",
"69.26.160.0/19",
]
print_acl_lines(
acl_name=acl_name,
ips=webex_ips,
section_comment="IPv4 and IPv6 destinations for Cisco Webex",
)
# Edited. April 1st 2020
# Per advice from Microsoft they do NOT advise using dynamic split tunneling for their properties related to Office 365
#
print(
"\n\n##### Step 2: Create an Anyconnect custom attribute for dynamic split excludes\n"
)
print("SKIP. Per Microsoft as of April 2020 they advise not to dynamically split fqdn related to Office365")
#print(
# """
#webvpn
# anyconnect-custom-attr dynamic-split-exclude-domains description dynamic-split-exclude-domains
#
#anyconnect-custom-data dynamic-split-exclude-domains saas {}
#""".format(
# ",".join([re.sub(r"^\*\.", "", f) for f in o365_fqdns])
# )
#)
#
print("\n##### Step 3: Configure the split exclude in the group-policy\n")
print(
"""
group-policy GP1 attributes
split-tunnel-policy excludespecified
ipv6-split-tunnel-policy excludespecified
split-tunnel-network-list value {acl_name}
""".format(
acl_name=acl_name
)
)
참고:게시된 IPv4 및 IPv6 주소 범위를 사용하여 스플릿 터널링을 구성하여 주요 Office 365 서비스로 향하는 트래픽을 VPN 연결 범위에서 제외할 것을 권장합니다.VPN 용량을 최적으로 사용하고 가장 효율적으로 사용하려면 Office 365 Exchange Online, SharePoint Online 및 Microsoft Teams(Microsoft 설명서의 최적화 카테고리)와 관련된 전용 IP 주소 범위에 대한 트래픽을 VPN 터널 외부에서 직접 라우팅해야 합니다.이 권장 사항에 대한 자세한 내용은 VPN 스플릿 터널링을 사용하는 원격 사용자의 Office 365 연결 최적화를 참조하십시오.
참고:2020년 4월 초 현재 Microsoft Teams는 IP 범위 13.107.60.1/32을 터널에서 제외해야 한다는 종속성을 가지고 있습니다.자세한 내용은 Teams 미디어 트래픽 구성 및 보안을 참조하십시오.
확인
사용자가 연결되면 ACL에 제공된 주소와 "동적 터널 제외" 목록으로 채워진 "비보안 경로"를 확인해야 합니다.

