I work in a production department, we program Teltonika RUT routers to a standardized configuration to be delivered to venues. We currently program each unit individually on 192.168.1.1.
I have purchased a hEX S, I want the ability to have 3 Teltonika routers connected directly to the hEX S and i want to be able to connect via my workstation, to each router individually on their factory IP 192.18.1.1 so i can program them at the same time, being able to work on 3 routers are the same time will increase my output of standardized routers.
I’ve managed to work through connecting 1 router using port 8001 on ether3 (192.168.88.1:8001), but ether4 and ether5 (8002 and 8803, respectivly) don’t load the webui of the Teltonika Routers.
I’ve put my config below, but I cannot figure out at what step this is going wrong.
/interface bridge
add admin-mac= auto-mac=no comment=defconf name=bridge
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge name=defconf
/routing table
add fib name=to-ether3
add fib name=to-ether4
add fib name=to-ether5
add fib name=to-ether3
add fib name=to-ether4
add fib name=to-ether5
/disk settings
set auto-media-interface=bridge auto-media-sharing=yes auto-smb-sharing=yes
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=sfp1
/interface bridge settings
set use-ip-firewall=yes
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.1.2/24 comment="To Teltonika #1" interface=ether3 \
network=192.168.1.0
add address=192.168.2.2/24 comment="To Teltonika #2" interface=ether4 \
network=192.168.2.0
add address=192.168.3.2/24 comment="To Teltonika #3" interface=ether5 \
network=192.168.3.0
/ip dhcp-client
# Interface not active
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf 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=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
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 hw-offload=yes
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
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 mangle
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8001 new-routing-mark=to-ether3 protocol=tcp
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8002 new-routing-mark=to-ether4 protocol=tcp
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8003 new-routing-mark=to-ether5 protocol=tcp
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8001 new-routing-mark=to-ether3 protocol=tcp
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8002 new-routing-mark=to-ether4 protocol=tcp
add action=mark-routing chain=prerouting dst-address=192.168.88.1 dst-port=\
8003 new-routing-mark=to-ether5 protocol=tcp
/ip firewall nat
add action=masquerade chain=srcnat comment="NAT to Teltonika 1" \
out-interface=ether3
add action=masquerade chain=srcnat comment="NAT to Teltonika 2" \
out-interface=ether4
add action=masquerade chain=srcnat comment="NAT to Teltonika 3" \
out-interface=ether5
add action=dst-nat chain=dstnat comment="Teltonika 1 Web" dst-address=\
192.168.88.1 dst-port=8001 protocol=tcp to-addresses=192.168.1.1 \
to-ports=80
add action=dst-nat chain=dstnat comment="Teltonika 2 Web" dst-address=\
192.168.88.1 dst-port=8002 protocol=tcp to-addresses=192.168.2.1 \
to-ports=80
add action=dst-nat chain=dstnat comment="Teltonika 3 Web" dst-address=\
192.168.88.1 dst-port=8003 protocol=tcp to-addresses=192.168.3.1 \
to-ports=80
/ip route
add comment="Route to Teltonika 1" disabled=no distance=1 dst-address=\
192.168.1.1/32 gateway=0.0.0.0 routing-table=to-ether3 \
suppress-hw-offload=no
add comment="Route to Teltonika 2" disabled=no distance=1 dst-address=\
192.168.1.1/32 gateway=0.0.0.0 routing-table=to-ether4 \
suppress-hw-offload=no
add comment="Route to Teltonika 3" disabled=no distance=1 dst-address=\
192.168.1.1/32 gateway=0.0.0.0 routing-table=to-ether5 \
suppress-hw-offload=no
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" \
dst-port=33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=fasttrack-connection chain=forward comment="defconf: fasttrack6" \
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
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/routing rule
add action=lookup disabled=no routing-mark=to-ether3 table=to-ether3
add action=lookup disabled=no routing-mark=to-ether4 table=to-ether4
add action=lookup routing-mark=to-ether5 table=to-ether5
add action=lookup routing-mark=to-ether3 table=to-ether3
add action=lookup routing-mark=to-ether4 table=to-ether4
add action=lookup routing-mark=to-ether5 table=to-ether5
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
`