I've been using Mikrotik for awhile & am probably considered intermediate with my skills... by no means a pro.
I have drawn a picture to best explain my situation & will post my configs here. I am trying to forward port 80 from my public IP, thru the L2TP tunnel, which connects from behind a NAT, to port 80 on a local devices on the 10.19.56.0/24 subnet.
Config of router with the public IP 104.192.158.xx & private subnet 192.168.101.0/24 running L2TP server.
Also, I am able to ping 10.19.56.56 from this router.
Code: Select all
/export hide-sensitive
# jul/25/2020 11:07:01 by RouterOS 6.45.7
# software id = LHVV-3JEB
#
# model = RB952Ui-5ac2nD
# serial number = 924D0926AFCA
/interface bridge
add admin-mac=B8:69:F4:FA:75:CB auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
disabled=no distance=indoors frequency=auto installation=indoor mode=\
ap-bridge ssid=MikroTik10 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX \
distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=\
MikroTik-FA75CF wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.101.10-192.168.101.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
/ppp profile
set *FFFFFFFE bridge=bridge local-address=172.0.0.1 on-up="if ([/interface l2tp-\
server print count-only where user=\$user && !dynamic] = 0) do={\r\
\nlog info message=\"L2TP Server Binding current user\"\r\
\n/interface l2tp-server add name=\$user user=\$user\r\
\n/interface l2tp-server remove [find where name=\$user]\r\
\n}" remote-address=172.0.0.2
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface l2tp-server server
set enabled=yes keepalive-timeout=60 mrru=1600 one-session-per-host=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface sstp-server server
set default-profile=default-encryption mrru=1600
/ip address
add address=192.168.101.1/24 comment=defconf interface=bridge network=\
192.168.101.0
add address=104.192.158.67/24 interface=ether1 network=104.192.158.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server network
add address=192.168.101.0/24 comment=defconf gateway=192.168.101.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=forward comment=\
"Accept connection from outside to port 80" dst-port=80 in-interface=ether1 \
log=yes protocol=tcp
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" disabled=yes dst-address=\
127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
invalid disabled=yes
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" \
connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=104.192.158.67 dst-port=80 \
in-interface=ether1 log=yes protocol=tcp to-addresses=10.19.56.56 to-ports=\
80
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=\
out,none out-interface-list=WAN
/ip route
add distance=1 gateway=104.192.158.1
add distance=1 dst-address=10.19.56.0/24 gateway=<l2tp-remote.vpn>
add distance=1 dst-address=10.22.0.0/24 gateway=<l2tp-remote.vpn>
/ip service
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/
ppp secret
add name=remote.vpn profile=default-encryption
/routing ospf network
add area=backbone network=10.19.56.1/32
/system clock
set time-zone-name=America/Chicago
/system routerboard settings
set protected-routerboot=enabled reformat-hold-button=1m
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
I have all of the drop firewall rules disabled temporarily for simplicity.
Code: Select all
/export hide-sensitive
# jul/25/2020 12:07:36 by RouterOS 6.47
# software id = LIJ2-78ES
#
# model = RB760iGS
# serial number = AE370B5EBDFD
/interface bridge
add admin-mac=C4:AD:34:DA:7B:B3 auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] mac-address=E8:2C:6D:23:70:FC name=ether1-WAN
set [ find default-name=ether2 ] mtu=1596 name=ether2-BH
set [ find default-name=ether3 ] name=ether3-NDB
set [ find default-name=ether5 ] poe-out=off
/interface l2tp-client
add connect-to=104.192.158.67 disabled=no mrru=1600 name=l2tp-out1 user=remote.vpn
/interface vlan
add interface=ether2-BH name=vlan22.cctv vlan-id=22
add interface=ether2-BH name=vlan99_cx-traffic vlan-id=99
add interface=ether2-BH name=vlan660.voip vlan-id=660
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip dhcp-server
add disabled=no interface=bridge lease-time=1d name=dhcp-default
/ip pool
add name=default-dhcp_pool ranges=10.19.56.100/31
add name=dhcp-cctv_pool ranges=10.22.0.100-10.22.0.200
add name=dhcp-voip_pool ranges=10.66.0.2-10.66.0.20
/ip dhcp-server
add address-pool=dhcp-cctv_pool disabled=no interface=vlan22.cctv lease-time=1d name=dhcp.cctv
add address-pool=dhcp-voip_pool disabled=no interface=vlan660.voip lease-time=1d name=dhcp.voip
/port
set 0 name=serial0
/ppp profile
set *FFFFFFFE bridge=bridge
/user group
set full policy=local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,password,web,sniff,sensitive,api,romon,dude,tikapp
/interface bridge port
add bridge=bridge comment=defconf interface=ether3-NDB
add bridge=bridge interface=vlan99_cx-traffic
/ip neighbor discovery-settings
set discover-interface-list=all
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1-WAN list=WAN
/ip address
add address=10.19.56.1/24 interface=bridge network=10.19.56.0
add address=10.22.0.1/24 interface=vlan22.cctv network=10.22.0.0
add address=10.66.0.1/24 interface=vlan660.voip network=10.66.0.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1-WAN
/ip dhcp-server config
set store-leases-disk=1d
/ip dhcp-server network
add address=10.19.56.0/24 comment=defconf dns-server=1.1.1.3 gateway=10.19.56.1
add address=10.22.0.0/24 dns-server=1.1.1.3 gateway=10.22.0.1
add address=10.66.0.0/24 dns-server=1.1.1.3 gateway=10.66.0.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.3
/ip dns static
add address=192.168.88.1 name=router.lan type=A
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=accept chain=input comment="Allow Remote Winbox Connection" in-interface=RemoteWinboxVPN
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid disabled=yes
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new disabled=yes in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip route
add distance=1 dst-address=192.168.101.0/24 gateway=l2tp-out1
/ip service
set www port=98
/system clock
set time-zone-name=America/Chicago
/system identity
set name=hEX-CoreRouter
/tool graphing interface
add interface=ether1-WAN
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
I've read lots of guides & threads but have not successfully got anywhere yet.
Any help would be appreciated. Thanks a bunch.
Levi