Community discussions

MikroTik App
 
spencer
just joined
Topic Author
Posts: 1
Joined: Thu Oct 07, 2021 12:57 pm

Router on a stick and two gateways. Is that possible?

Thu Oct 07, 2021 1:13 pm

Hi,
I've got a DSL router from my ISP (192.168.1.1/24) that has WiFi. I have a MikroTik hEX (WAN is 192.168.1.2/24) as well. Thing is, I want to use WiFi (ISP router) and Accounting (MikroTik)

My rough idea is: a WiFi connected device (let's say a laptop 192.168.1.3/24) will have its gateway configured to 192.168.1.2. So packets from a device will go to the ISP router, then by cable to MikroTik, then back again to the ISP router and DSL line.

Can it be done? I've tried with the following configuration, but no luck. MikroTik is not sending the packets back to the ISP router.
# oct/07/2021 12:09:04 by RouterOS 6.48.4
# model = RB750Gr3
/interface bridge
add admin-mac=2C:C8:1B:60:B8:34 auto-mac=no comment=defconf name=bridge
/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=10.0.0.9-10.0.0.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=dhcp-server
/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
/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 accounting
set enabled=yes
/ip accounting web-access
set accessible-via-web=yes address=10.0.0.0/24
/ip address
add address=10.0.0.1/24 comment=defconf interface=bridge network=10.0.0.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=10.0.0.0/24 comment=defconf gateway=10.0.0.1
/ip dns
set allow-remote-requests=yes
/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=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
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 nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2069
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Router on a stick and two gateways. Is that possible?

Tue Oct 12, 2021 11:16 pm

1. The firewall rules on the Mikrotik seems to be as per default, so firewall probably dropping the packet coming in on WAN interface .
2. Have not tested your scenario, but suspect if you resolve point 1 above, the Mikrotik is going to send an icmp redirect packet back to the laptop telling it to use 192.168.1.1 as gateway anyway
MTCNA, MTCTCE, MTCRE & MTCINE

Who is online

Users browsing this forum: GabrieleV, matpan and 22 guests