Здравствуйте.
Есть два шлюза
gw-office (pfsense)
WAN=IPWANOffice (белый статический адрес)
gw-region (микротик)
IPSWAN=IPWANRegion (белый статический адрес)
IPSLAN=192.168.8.254
LTELAN=192.168.77.101
LTE модем подключен к микротик
LTEWAN=IPLTERegion (белый статический адрес)
LTELAN=192.168.77.254
Микротик RB750Gr3 подключен к проводному провайдеру со статическим белым адресом. На нём поднят туннель GRE over IPsec до главного офиса. К микротику подключил LTE модем со статическим белым адресом, настроил интернет, хочу поднять второй туннель GRE over IPsec до центрального офиса. Проблема в том что lte модем даёт микротику по DHCP-client внутренний адрес и нет возможности построить туннель при помощи внешнего адреса. Сделал проброс портов 500, 4500, 50 и rdp на lte модеме. Настроил NAT на микротике, но ни GRE ни IPsec не поднимаются. RDP проброс кстати заработал.
ip firewall connection print
udp 192.168.77.101:4500 IPWANOffice:4500
udp IPWANRegion:4500 IPWANOffice:4500
gre IPWANRegion IPWANOffice
ipsec-esp IPWANRegion IPWANOffice
ip firewall nat print
0 ;;; Internet LAN to WAN IPS
chain=srcnat action=src-nat to-addresses=IPWANRegion out-interface=LAN1-WAN log=no log-prefix=""
1 ;;; Internet LAN to WAN LTE
chain=srcnat action=masquerade to-addresses=192.168.77.254 out-interface=USB-LTE log=no log-prefix=""
2 ;;; RDP
chain=dstnat action=dst-nat to-addresses=192.168.8.23 to-ports=3389 protocol=tcp
in-interface=USB-LTE dst-port=3389 log=yes log-prefix=""
3 ;;; GRE
chain=dstnat action=dst-nat to-addresses=192.168.77.101 protocol=gre in-interface=USB-LTE log=no log-prefix=""
4 ;;; UDP IKE 500
chain=dstnat action=dst-nat to-addresses=192.168.77.101 to-ports=500 protocol=udp
in-interface=USB-LTE dst-port=500 log=no log-prefix=""
5 ;;; UDP IPSEC NAT-Traversal 4500
chain=dstnat action=dst-nat to-addresses=192.168.77.101 to-ports=4500 protocol=udp
in-interface=USB-LTE dst-port=4500 log=no log-prefix=""
6 ;;; IPsec-ESP
chain=dstnat action=dst-nat to-addresses=192.168.77.101 protocol=ipsec-esp in-interface=USB-LTE
log=no log-prefix=""
ip route print
0 ADS 0.0.0.0/0 192.168.77.254 2
1 S 0.0.0.0/0 IPWANRegion GW 3
2 ADC xx.xx.xx.xx/25 IPWANRegion LAN1-WAN 0
3 A S 192.168.0.0/24 192.168.8.254 192.168.10.5 1
4 S 192.168.0.0/24 192.168.8.254 192.168.10.21 1
5 ADC 192.168.10.4/30 192.168.10.6 GRE-O 0
6 DC 192.168.10.20/30 192.168.10.22 GRE-O2 255
7 ADC 192.168.77.0/24 192.168.77.101 USB-LTE 0
ip address print
0 IPWANRegion/25 xx.xx.xx.xx LAN1-WAN
1 192.168.8.254/24 192.168.8.0 LAN-Bridge
2 192.168.10.6/30 192.168.10.4 GRE-O
3 192.168.10.22/30 192.168.10.20 GRE-O2
4 D 192.168.77.101/24 192.168.77.0 USB-LTE
interface print
0 R LAN1-WAN ether 1500 1596
1 RS LAN2-Ethernet ether 1500 1596
2 RS LAN3-Ethernet ether 1500 1596
3 RS LAN4-Ethernet ether 1500 1596
4 S LAN5-Ethernet ether 1500 1596
5 R ;;; GRE1 IPWANRegion
GRE-O gre-tunnel 1400 65535
6 ;;; GRE2 IPLTERegion
GRE-O2 gre-tunnel 1400 65535
7 R LAN-Bridge bridge 1500 1596
8 R USB-LTE lte 1500
interface gre print
0 R ;;; GRE1 IPWANRegion
name="GRE-O" mtu=1400 actual-mtu=1400 local-address=IPWANRegion remote-address=IPWANOffice keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes
1 ;;; GRE2 IPLTERegion
name="GRE-O2" mtu=1400 actual-mtu=1400 local-address=192.168.77.101 remote-address=IPWANOffice keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes
interface lte apn print
0 * name="default" apn="FixedIP.nw" use-peer-dns=yes add-default-route=yes default-route-distance=2
ip ipsec active-peers print
0 ;;; GRE1
IPWANOffice established 3h23m2s 1 IPWANOffice
1 ;;; GRE2
message-1-sent 0s 1 IPWANOffice
ip ipsec peer print
0 ;;; GRE1
name="IPSec gw-office" address=IPWANOffice/32 local-address=IPWANRegion profile=GRE-KU-0 exchange-mode=ike2 send-initial-contact=yes
1 ;;; GRE2
name="IPSec gw-office2" address=IPWANOffice/32 local-address=192.168.77.101 profile=GRE-KU-0 exchange-mode=ike2 send-initial-contact=yes
ip ipsec policy print
0 A ;;; GRE1
IPSec gw-office no IPWANRegion/32 IPWANOffice/32 all encrypt unique 1
1 A ;;; GRE2
IPSec gw-office2 no 192.168.77.101/32 IPWANOffice/32 all encrypt unique 1
log
ipsec,info killing ike2 SA: IPSec gw-office2 192.168.77.101[4500]-IPWANOffice[4500]
spi:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ipsec,info new ike2 SA (I): IPSec IPSec gw-office2 192.168.77.101[4500]-IPWANOffice[4500]
spi:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ipsec,error got fatal error: AUTHENTICATION_FAILED
Как пробросить протоколы ipsec-esp и gre с внешнего на внутренний на lte модеме не представляю, т.к. там TCP и UDP правила. Читал что поднимают vlan и по нему делают проброс трафика NAT-T. Но не понимаю зачем мне vlan и его нужно поднимать ещё на другой стороне. Добавил маркировку трафика в mangle - ipsec, ike, gre. Канал не поднимается и мыслей нет. Думаю брать hAP ax lite LTE6, но не знаю есть ли в нём функционал по туннелям.
Есть два шлюза
gw-office (pfsense)
WAN=IPWANOffice (белый статический адрес)
gw-region (микротик)
IPSWAN=IPWANRegion (белый статический адрес)
IPSLAN=192.168.8.254
LTELAN=192.168.77.101
LTE модем подключен к микротик
LTEWAN=IPLTERegion (белый статический адрес)
LTELAN=192.168.77.254
Микротик RB750Gr3 подключен к проводному провайдеру со статическим белым адресом. На нём поднят туннель GRE over IPsec до главного офиса. К микротику подключил LTE модем со статическим белым адресом, настроил интернет, хочу поднять второй туннель GRE over IPsec до центрального офиса. Проблема в том что lte модем даёт микротику по DHCP-client внутренний адрес и нет возможности построить туннель при помощи внешнего адреса. Сделал проброс портов 500, 4500, 50 и rdp на lte модеме. Настроил NAT на микротике, но ни GRE ни IPsec не поднимаются. RDP проброс кстати заработал.
ip firewall connection print
udp 192.168.77.101:4500 IPWANOffice:4500
udp IPWANRegion:4500 IPWANOffice:4500
gre IPWANRegion IPWANOffice
ipsec-esp IPWANRegion IPWANOffice
ip firewall nat print
0 ;;; Internet LAN to WAN IPS
chain=srcnat action=src-nat to-addresses=IPWANRegion out-interface=LAN1-WAN log=no log-prefix=""
1 ;;; Internet LAN to WAN LTE
chain=srcnat action=masquerade to-addresses=192.168.77.254 out-interface=USB-LTE log=no log-prefix=""
2 ;;; RDP
chain=dstnat action=dst-nat to-addresses=192.168.8.23 to-ports=3389 protocol=tcp
in-interface=USB-LTE dst-port=3389 log=yes log-prefix=""
3 ;;; GRE
chain=dstnat action=dst-nat to-addresses=192.168.77.101 protocol=gre in-interface=USB-LTE log=no log-prefix=""
4 ;;; UDP IKE 500
chain=dstnat action=dst-nat to-addresses=192.168.77.101 to-ports=500 protocol=udp
in-interface=USB-LTE dst-port=500 log=no log-prefix=""
5 ;;; UDP IPSEC NAT-Traversal 4500
chain=dstnat action=dst-nat to-addresses=192.168.77.101 to-ports=4500 protocol=udp
in-interface=USB-LTE dst-port=4500 log=no log-prefix=""
6 ;;; IPsec-ESP
chain=dstnat action=dst-nat to-addresses=192.168.77.101 protocol=ipsec-esp in-interface=USB-LTE
log=no log-prefix=""
ip route print
0 ADS 0.0.0.0/0 192.168.77.254 2
1 S 0.0.0.0/0 IPWANRegion GW 3
2 ADC xx.xx.xx.xx/25 IPWANRegion LAN1-WAN 0
3 A S 192.168.0.0/24 192.168.8.254 192.168.10.5 1
4 S 192.168.0.0/24 192.168.8.254 192.168.10.21 1
5 ADC 192.168.10.4/30 192.168.10.6 GRE-O 0
6 DC 192.168.10.20/30 192.168.10.22 GRE-O2 255
7 ADC 192.168.77.0/24 192.168.77.101 USB-LTE 0
ip address print
0 IPWANRegion/25 xx.xx.xx.xx LAN1-WAN
1 192.168.8.254/24 192.168.8.0 LAN-Bridge
2 192.168.10.6/30 192.168.10.4 GRE-O
3 192.168.10.22/30 192.168.10.20 GRE-O2
4 D 192.168.77.101/24 192.168.77.0 USB-LTE
interface print
0 R LAN1-WAN ether 1500 1596
1 RS LAN2-Ethernet ether 1500 1596
2 RS LAN3-Ethernet ether 1500 1596
3 RS LAN4-Ethernet ether 1500 1596
4 S LAN5-Ethernet ether 1500 1596
5 R ;;; GRE1 IPWANRegion
GRE-O gre-tunnel 1400 65535
6 ;;; GRE2 IPLTERegion
GRE-O2 gre-tunnel 1400 65535
7 R LAN-Bridge bridge 1500 1596
8 R USB-LTE lte 1500
interface gre print
0 R ;;; GRE1 IPWANRegion
name="GRE-O" mtu=1400 actual-mtu=1400 local-address=IPWANRegion remote-address=IPWANOffice keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes
1 ;;; GRE2 IPLTERegion
name="GRE-O2" mtu=1400 actual-mtu=1400 local-address=192.168.77.101 remote-address=IPWANOffice keepalive=10s,10 dscp=inherit clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes
interface lte apn print
0 * name="default" apn="FixedIP.nw" use-peer-dns=yes add-default-route=yes default-route-distance=2
ip ipsec active-peers print
0 ;;; GRE1
IPWANOffice established 3h23m2s 1 IPWANOffice
1 ;;; GRE2
message-1-sent 0s 1 IPWANOffice
ip ipsec peer print
0 ;;; GRE1
name="IPSec gw-office" address=IPWANOffice/32 local-address=IPWANRegion profile=GRE-KU-0 exchange-mode=ike2 send-initial-contact=yes
1 ;;; GRE2
name="IPSec gw-office2" address=IPWANOffice/32 local-address=192.168.77.101 profile=GRE-KU-0 exchange-mode=ike2 send-initial-contact=yes
ip ipsec policy print
0 A ;;; GRE1
IPSec gw-office no IPWANRegion/32 IPWANOffice/32 all encrypt unique 1
1 A ;;; GRE2
IPSec gw-office2 no 192.168.77.101/32 IPWANOffice/32 all encrypt unique 1
log
ipsec,info killing ike2 SA: IPSec gw-office2 192.168.77.101[4500]-IPWANOffice[4500]
spi:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ipsec,info new ike2 SA (I): IPSec IPSec gw-office2 192.168.77.101[4500]-IPWANOffice[4500]
spi:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ipsec,error got fatal error: AUTHENTICATION_FAILED
Как пробросить протоколы ipsec-esp и gre с внешнего на внутренний на lte модеме не представляю, т.к. там TCP и UDP правила. Читал что поднимают vlan и по нему делают проброс трафика NAT-T. Но не понимаю зачем мне vlan и его нужно поднимать ещё на другой стороне. Добавил маркировку трафика в mangle - ipsec, ike, gre. Канал не поднимается и мыслей нет. Думаю брать hAP ax lite LTE6, но не знаю есть ли в нём функционал по туннелям.