/ip firewall nat
add chain=dstnat action=dst-nat to-addresses=8.8.8.8 to-ports=22 protocol=tcp dst-address-type=local dst-port=522
/ip route
add dst-address=0.0.0.0/0 gateway=<gateway for WAN1> routing-mark=WAN1
add dst-address=0.0.0.0/0 gateway=<gateway for WAN2> routing-mark=WAN2
Thanks Che, I'm looking forward to reading your reply!!This is a common mistake with implementing mangle rules, and oddly enough correct solutions are hard to find. In short, you are missing mangle rules in order to make this work properly, but sadly I don't have time to write them now. If noone jumps in I'll post them tonight.
/ip firewall mangle
add chain=prerouting in-interface=eth_Wan2
add action=mark-connection chain=forward connection-state=new in-interface=eth_Wan2 new-connection-mark=WAN2 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN2 new-routing-mark=WAN2 passthrough=no
chain=dstnat action=dst-nat to-addresses=8.8.8.8 to-ports=22 protocol=tcp dst-port=522 log=no log-prefix=""
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=WAN1ADDRESS dst-port=522 protocol=tcp to-addresses=8.8.8.8 to-ports=22
add action=dst-nat chain=dstnat dst-address=WAN2ADDRESS dst-port=522 protocol=tcp to-addresses=8.8.8.8 to-ports=22
Thank you, but I do not use fast track rules in the firewall, so I do not think that is the issue.One idea, can't it be fasttrack? I don't normally use it, so I'm not sure, but it makes packets skip some steps, maybe that includes routing? Check that, I'm too lazy to look it up right now myself.
Thank you - unfortunately the gateway is assigned by DHCP from the PPPoE and after speaking to the provider, the gateway changes periodically, so reluctant to hard code.In your case, you didn't post many details about your config, but if you have two gateways with same address, you should try routes with gateway=<address>%<interface> (e.g. gateway=1.2.3.4%ether1).
/ip dhcp-client
add default-route-distance=7 interface=test2
/routing filter
add chain=dynamic-in distance=7 set-distance=1 set-in-nexthop-direct=test3
Thank you, I will try this in the next maintenance window. So I replace "test2" with "pppoe-out1", what is "test3" referencing?You can try to play with routing filters (distance 7 serves as unique selector):Code: Select all/ip dhcp-client add default-route-distance=7 interface=test2 /routing filter add chain=dynamic-in distance=7 set-distance=1 set-in-nexthop-direct=test3
/interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 R ;;; WAN1
ether1 ether 1500 1598 8156
1 R ;;; WAN2
ether2 ether 1500 1598 8156
2 R ;;; LAN Trunk
ether3 ether 1500 1598 8156
3 ether4 ether 1500 1598 8156
4 ;;; Config
ether5 ether 1500 1598 8156
5 ether6 ether 1500 1598 8156
6 ether7 ether 1500 1598 8156
7 ether8 ether 1500 1598 8156
8 ether9 ether 1500 1598 8156
9 ether10 ether 1500 1598 8156
10 sfp1 ether 1500 1600 8158
11 R ;;; WAN1
pppoe-out1 pppoe-out 1492
12 R ;;; WAN2
pppoe-out2 pppoe-out 1492
13 R ;;; Main
vlan2 vlan 1500 1594
14 R ;;; Staff
vlan3 vlan 1500 1594
15 R ;;; Guest
vlan4 vlan 1500 1594
16 R ;;; Hosted
vlan5 vlan 1500 1594
/ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 62.3.80.17 1
1 DS 0.0.0.0/0 62.3.80.17 2
2 ADC 62.3.80.17/32 88.xxx.xxx.151 pppoe-out1 0
3 ADC 62.3.80.17/32 88.xxx.xxx.182 pppoe-out2 0
4 ADC 192.168.1.0/24 192.168.1.1 vlan3 0
5 ADC 192.168.2.0/24 192.168.2.1 vlan4 0
6 ADC 192.168.50.0/24 192.168.50.1 vlan2 0
7 ADC 192.168.70.0/24 192.168.70.1 vlan5 0
8 A S 192.168.71.0/24 192.168.70.10 1
9 DC 192.168.88.0/24 192.168.88.1 ether5 255
4 ADC 62.3.80.17/32 88.0.0.182 pppoe-out2 0
pppoe-out1
Hi again, you caught me out that time, correct - when they match it shows as one line, I however doctored the "route print" to show with the same gateway, sometimes it comes up with different gateways for each, but often they are the same - just not that day."test2" and "test3" are my interfaces. Unfortunately, this is most likely wrong. I still think that something can be done using route filters, but I'll have to do few experiments to see if I can come up with working solution.
You can help by sharing your PPPoE config, specifically I'm looking for any hint why you have two routes for 62.3.80.17/32, but I get only one with two interfaces (I'm a little new to PPPoE):Code: Select all4 ADC 62.3.80.17/32 88.0.0.182 pppoe-out2 0 pppoe-out1
/ip route
add distance=1 gateway=pppoe-out1 routing-mark=wan1
add distance=1 gateway=pppoe-out2 routing-mark=wan2
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out1 \
new-connection-mark=wan1 passthrough=yes
add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out2 \
new-connection-mark=wan2 passthrough=yes
add action=mark-routing chain=output connection-mark=wan1 new-routing-mark=wan1 \
passthrough=yes
add action=mark-routing chain=output connection-mark=wan2 new-routing-mark=wan2 \
passthrough=yes
/ip firewall mangle
add action=mark-routing chain=prerouting connection-mark=wan1 in-interface=<LAN> \
new-routing-mark=wan1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=wan1 in-interface=<LAN> \
new-routing-mark=wan2 passthrough=yes
/ip route rule
add action=lookup-only-in-table dst-address=192.168.0.0/16 table=main
HiI don't see a way how to do what I wanted to with route filters (it doesn't necessarily mean that there isn't one, I might have overlooked something). But if I understand it correctly, PPPoE should not care about gateways very much and should work with routes that have interface as gateway. I tried it with connections to router and it works:To use it with internal services (dstnat), add either just these rules:Code: Select all/ip route add distance=1 gateway=pppoe-out1 routing-mark=wan1 add distance=1 gateway=pppoe-out2 routing-mark=wan2 /ip firewall mangle add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out1 \ new-connection-mark=wan1 passthrough=yes add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out2 \ new-connection-mark=wan2 passthrough=yes add action=mark-routing chain=output connection-mark=wan1 new-routing-mark=wan1 \ passthrough=yes add action=mark-routing chain=output connection-mark=wan2 new-routing-mark=wan2 \ passthrough=yes
Or you can drop in-interface=<LAN> to make it work with all interfaces and also add this:Code: Select all/ip firewall mangle add action=mark-routing chain=prerouting connection-mark=wan1 in-interface=<LAN> \ new-routing-mark=wan1 passthrough=yes add action=mark-routing chain=prerouting connection-mark=wan1 in-interface=<LAN> \ new-routing-mark=wan2 passthrough=yes
Code: Select all/ip route rule add action=lookup-only-in-table dst-address=192.168.0.0/16 table=main
/interface pppoe-client
add add-default-route=yes comment=WAN1 default-route-distance=1 disabled=no interface=ether1 keepalive-timeout=disabled max-mru=1492 max-mtu=1492 name=\
pppoe-out1 password=xxx user=acc1
add add-default-route=yes comment=WAN2 default-route-distance=2 disabled=no interface=ether2 keepalive-timeout=disabled max-mru=1492 max-mtu=1492 name=\
pppoe-out2 password=xxx user=acc2
Below is the configuration, currently pppoe-out1 is disconnected to allow function on pppoe-out2 as normal.It may be time to post your config (routes, firewall rules, ...), because marking routing is something that usually works without any problem. You may have some tiny mistake somewhere...
/ip route
add distance=1 dst-address=192.168.71.0/24 gateway=192.168.70.10
/ip firewall address-list
add address=224.0.0.0/4 list=Bogon
add address=203.0.113.0/24 list=Bogon
add address=198.51.100.0/24 list=Bogon
add address=198.18.0.0/15 list=Bogon
add address=192.88.99.0/24 list=Bogon
add address=192.0.2.0/24 list=Bogon
add address=192.168.0.0/16 list=Bogon
add address=172.16.0.0/12 list=Bogon
add address=169.254.0.0/16 list=Bogon
add address=127.0.0.0/16 list=Bogon
add address=10.0.0.0/8 list=Bogon
add address=0.0.0.0/8 list=Bogon
/ip firewall filter
add action=drop chain=input comment=Invalid connection-state=invalid
add action=accept chain=input comment=Config ipsec-policy=in,ipsec
# pppoe-out1 not ready
add action=drop chain=input comment="Bogon WAN1" in-interface=pppoe-out1 src-address-list=Bogon
add action=drop chain=input comment="Bogon WAN2" in-interface=pppoe-out2 src-address-list=Bogon
add action=accept chain=input comment=Site-to-Site in-interface=pppoe-out2 protocol=ipsec-esp
add action=accept chain=input comment="Established, Related" connection-state=established,related
add action=accept chain=input comment=DNS dst-port=53 in-interface=all-vlan protocol=udp
add action=accept chain=input comment=DNS dst-port=53 in-interface=all-vlan protocol=tcp
add action=accept chain=input comment=Config in-interface=vlan2
add action=accept chain=input comment=Config in-interface=vlan5
add action=accept chain=input comment=Config in-interface=ether5
add action=accept chain=input comment=ICMP in-interface=all-vlan protocol=icmp
add action=drop chain=input comment=Drop
add action=drop chain=forward comment=Invalid connection-state=invalid
add action=accept chain=forward comment=Site-to-Site ipsec-policy=in,ipsec
add action=accept chain=forward comment="Main VLAN to Hosted VLAN" in-interface=vlan2 out-interface=vlan5
add action=accept chain=forward comment="Hosted VLAN to Main VLAN" in-interface=vlan5 out-interface=vlan2
# pppoe-out1 not ready
add action=drop chain=forward comment="Bogon WAN1" in-interface=pppoe-out1 src-address-list=Bogon
add action=drop chain=forward comment="Bogon WAN2" in-interface=pppoe-out2 src-address-list=Bogon
add action=accept chain=forward comment="Established, Related" connection-state=established,related
# pppoe-out1 not ready
add action=accept chain=forward comment="VLAN to WAN1" in-interface=all-vlan out-interface=pppoe-out1
add action=accept chain=forward comment="VLAN to WAN2" in-interface=all-vlan out-interface=pppoe-out2
# pppoe-out1 not ready
add action=accept chain=forward comment="Config to WAN1" in-interface=ether5 out-interface=pppoe-out1
add action=accept chain=forward comment="Config to WAN2" in-interface=ether5 out-interface=pppoe-out2
add action=accept chain=forward comment="HTTPS: srv-remote" dst-address=192.168.50.12 dst-port=443 protocol=tcp
add action=accept chain=forward comment="HTTP: srv-lamp" dst-address=192.168.50.14 dst-port=80 protocol=tcp
add action=accept chain=forward comment="OpenVPN: srv-vpn" dst-address=192.168.70.10 dst-port=1194 protocol=udp
add action=accept chain=forward comment="SSH: srv-host1" dst-address=192.168.50.5 dst-port=22 protocol=tcp
add action=accept chain=forward comment="SSH: srv-back" dst-address=192.168.50.30 dst-port=22 protocol=tcp
add action=accept chain=forward comment="SSH: srv-arch" dst-address=192.168.50.31 dst-port=22 protocol=tcp
add action=accept chain=forward comment="SSH: srv-lamp" dst-address=192.168.50.14 dst-port=22 protocol=tcp
add action=accept chain=forward comment="SSH: srv-vpn" dst-address=192.168.70.10 dst-port=22 protocol=tcp
add action=accept chain=forward comment="SSH: srv-qb" dst-address=192.168.50.13 dst-port=22 protocol=tcp src-address=82.145.45.154
add action=accept chain=forward comment="Camera: camera" dst-address=192.168.50.81 dst-port=8000 protocol=tcp
add action=drop chain=forward comment=Drop
/ip firewall nat
add action=masquerade chain=srcnat comment=Loopback dst-address=192.168.50.0/24 src-address=192.168.50.0/24
add action=masquerade chain=srcnat comment="Loopback (Hosted)" dst-address=192.168.70.0/24 src-address=192.168.70.0/24
add action=accept chain=srcnat comment=Site-to-Site dst-address=192.168.0.0/16 src-address=192.168.50.0/24
add action=accept chain=srcnat comment="Site-to-Site (Hosted)" dst-address=192.168.0.0/16 src-address=192.168.70.0/24
add action=accept chain=srcnat comment="Site-to-Site (VPN)" dst-address=192.168.0.0/16 src-address=192.168.71.0/24
# pppoe-out1 not ready
add action=masquerade chain=srcnat comment=WAN1 out-interface=pppoe-out1
add action=masquerade chain=srcnat comment=WAN2 out-interface=pppoe-out2
add action=dst-nat chain=dstnat comment="HTTPS: srv-remote" dst-address=88.xx.xx.182 dst-port=443 protocol=tcp to-addresses=192.168.50.12
add action=dst-nat chain=dstnat comment="HTTP: srv-lamp" dst-address=88.xx.xx.182 dst-port=80 protocol=tcp to-addresses=192.168.50.14
add action=dst-nat chain=dstnat comment="OpenVPN: srv-vpn" dst-address=88.xx.xx.182 dst-port=1194 protocol=udp to-addresses=192.168.70.10
add action=dst-nat chain=dstnat comment="SSH: srv-host1 (WAN1)" dst-address=88.xx.xx.151 dst-port=22 protocol=tcp to-addresses=192.168.50.5
add action=dst-nat chain=dstnat comment="SSH: srv-host1 (WAN2)" dst-address=88.xx.xx.182 dst-port=22 protocol=tcp to-addresses=192.168.50.5
add action=dst-nat chain=dstnat comment="SSH: srv-back (WAN1)" dst-address=88.xx.xx.151 dst-port=222 protocol=tcp to-addresses=192.168.50.30 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-back (WAN2)" dst-address=88.xx.xx.182 dst-port=222 protocol=tcp to-addresses=192.168.50.30 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-arch (WAN1)" dst-address=88.xx.xx.151 dst-port=223 protocol=tcp to-addresses=192.168.50.31 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-arch (WAN2)" dst-address=88.xx.xx.182 dst-port=223 protocol=tcp to-addresses=192.168.50.31 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-lamp" dst-address=88.xx.xx.182 dst-port=224 protocol=tcp to-addresses=192.168.50.14 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-vpn" dst-address=88.xx.xx.182 dst-port=225 protocol=tcp to-addresses=192.168.70.10 to-ports=22
add action=dst-nat chain=dstnat comment="SSH: srv-qb" dst-address=88.xx.xx.182 dst-port=230 protocol=tcp to-addresses=192.168.50.13 to-ports=22
add action=dst-nat chain=dstnat comment="Camera: camera" dst-address=88.xx.xx.182 dst-port=8000 protocol=tcp to-addresses=192.168.50.81
I know exactly what you mean, I have tried from scratch several times (by reverting to clean backup) but still no dice, I will try again soon when I am onsite - it is infuriating, and your help is greatly appreciated. Thank youIt must work, it's just three simple steps:
- Incoming connection from pppoe-outX gets marked with connection mark wanX
- Outgoing packets with connection mark wanX get routing mark wanX
- The only route from routing table wanX gets used
What could go wrong there? You can easily verify first two steps. There are counters and if you have doubts, you can enable logging for rules and make sure they really catch the right packets. And once the packet gets routing mark, it can't choose wrong route, because there's only one in given routing table, which points to right interface. I don't have any explanation, except perhaps a typo in routing table name.
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 A S 0.0.0.0/0 pppoe-out1 1
1 A S 0.0.0.0/0 pppoe-out2 1
2 ADS 0.0.0.0/0 62.3.80.17 1
3 DS 0.0.0.0/0 62.3.80.17 2
4 ADC 62.3.80.17/32 88.xx.xx.182 pppoe-out2 0
pppoe-out1
5 ADC 192.168.1.0/24 192.168.1.1 vlan3 0
6 ADC 192.168.2.0/24 192.168.2.1 vlan4 0
7 ADC 192.168.50.0/24 192.168.50.1 vlan2 0
8 ADC 192.168.70.0/24 192.168.70.1 vlan5 0
9 A S 192.168.71.0/24 192.168.70.10 1
10 DC 192.168.88.0/24 192.168.88.1 ether5 255
/ip route
add distance=1 gateway=pppoe-out1 routing-mark=wan1-route
add distance=1 gateway=pppoe-out2 routing-mark=wan2-route
add distance=1 dst-address=192.168.71.0/24 gateway=192.168.70.10
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out1 new-connection-mark=wan1-conn passthrough=yes
add action=mark-connection chain=prerouting connection-state=new in-interface=pppoe-out2 new-connection-mark=wan2-conn passthrough=yes
add action=mark-routing chain=output connection-mark=wan1-conn new-routing-mark=wan1-route passthrough=yes
add action=mark-routing chain=output connection-mark=wan2-conn new-routing-mark=wan2-route passthrough=yes
/ping 8.8.8.8 interface=pppoe-out1
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 61 36ms
1 8.8.8.8 56 61 18ms
2 8.8.8.8 56 61 18ms
sent=3 received=3 packet-loss=0% min-rtt=18ms avg-rtt=24ms max-rtt=36ms
/ping 8.8.8.8 interface=pppoe-out2
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
2 8.8.8.8 timeout
sent=3 received=0 packet-loss=100%
/ip route nexthop
0 address=62.3.80.17 gw-state=reachable forwarding-nexthop="" interface="" scope=10 check-gateway=none
1 address=192.168.70.10 gw-state=reachable forwarding-nexthop="" interface="" scope=10 check-gateway=none
I tried that first.. same as before - only the lowest distance interface responds.Try a different test, ping both public addresses from outside. Because when you initiate connection from router to internet, it won't get marked, because first packet coming back won't match connection-state=new.
/ping 8.8.8.8 routing-table=wan1-route
/ping 8.8.8.8 routing-table=wan2-route
[admin@router] > /ping 8.8.8.8 routing-table=wan1-route
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 61 18ms
1 8.8.8.8 56 61 18ms
sent=2 received=2 packet-loss=0% min-rtt=18ms avg-rtt=18ms max-rtt=18ms
[admin@router] > /ping 8.8.8.8 routing-table=wan2-route
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
sent=2 received=0 packet-loss=100%
/ip firewall mangle
add action=accept chain=postrouting dst-address=8.8.8.8 log=yes out-interface=pppoe-out1 protocol=icmp
add action=accept chain=postrouting dst-address=8.8.8.8 log=yes out-interface=pppoe-out2 protocol=icmp
01:43:00 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.0.0.151->8.8.8.8, NAT 88.0.0.151->8.8.8.8, len 56
01:43:05 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.0.0.182->8.8.8.8, NAT 88.0.0.182->8.8.8.8, len 56
00:47:18 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8, len 56
00:47:19 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8, len 56
00:47:20 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8, len 56
00:47:23 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8, len 56
00:47:24 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8, len 56
00:47:25 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8, len 56
/ip firewall mangle
add action=log chain=prerouting protocol=icmp src-address=8.8.8.8
[admin@router] /log> /ping 8.8.8.8 routing-table=wan1-route
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 56 61 19ms
1 8.8.8.8 56 61 18ms
sent=2 received=2 packet-loss=0% min-rtt=18ms avg-rtt=18ms max-rtt=19ms
[admin@router] /log> /ping 8.8.8.8 routing-table=wan2-route
SEQ HOST SIZE TTL TIME STATUS
0 8.8.8.8 timeout
1 8.8.8.8 timeout
sent=2 received=0 packet-loss=100%
00:56:28 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8, len 56
00:56:28 firewall,info prerouting: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.151, NAT 8.8.8.8->88.xxx.xxx.151, len 56
00:56:29 firewall,info postrouting: in:(none) out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8, len 56
00:56:29 firewall,info prerouting: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.151, NAT 8.8.8.8->88.xxx.xxx.151, len 56
00:56:32 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8, len 56
00:56:32 firewall,info prerouting: in:pppoe-out2 out:(none), src-mac 10:e8:78:a7:f3:79, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.182, NAT 8.8.8.8->88.xxx.xxx.182, len 56
00:56:33 firewall,info postrouting: in:(none) out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8, len 56
00:56:33 firewall,info prerouting: in:pppoe-out2 out:(none), src-mac 10:e8:78:a7:f3:79, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.182, NAT 8.8.8.8->88.xxx.xxx.182, len 56
/ip firewall filter
add action=drop chain=input comment=Invalid connection-state=invalid
add action=drop chain=input comment=Drop
01:11:44 firewall,info input: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 8, code 0), 78.xx.xx.11->88.xx.xx.151, NAT 78.xx.xx.11->88.xx.xx.151, len 84
01:11:45 firewall,info input: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 8, code 0), 78.xx.xx.11->88.xx.xx.151, NAT 78.xx.xx.11->88.xx.xx.151, len 84
01:11:46 firewall,info input: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 8, code 0), 78.xx.xx.11->88.xx.xx.151, NAT 78.xx.xx.11->88.xx.xx.151, len 84
01:11:47 firewall,info input: in:pppoe-out1 out:(none), src-mac 10:e8:78:a7:e6:02, proto ICMP (type 8, code 0), 78.xx.xx.11->88.xx.xx.151, NAT 78.xx.xx.11->88.xx.xx.151, len 84
/ip firewall filter
add action=log chain=forward protocol=icmp
Done.. nothing logsHmmm... we see the packet in prerouting, but it doesn't get to input. Where else it can go? Put this at the top:Code: Select all/ip firewall filter add action=log chain=forward protocol=icmp
The last one gets lost somewhere in your router. But how and why?postrouting: out:pppoe-out1, proto ICMP (type 8, code 0), 88.xxx.xxx.151->8.8.8.8, NAT 88.xxx.xxx.151->8.8.8.8
prerouting: in:pppoe-out1, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.151, NAT 8.8.8.8->88.xxx.xxx.151
postrouting: out:pppoe-out2, proto ICMP (type 8, code 0), 88.xxx.xxx.182->8.8.8.8, NAT 88.xxx.xxx.182->8.8.8.8
prerouting: in:pppoe-out2, proto ICMP (type 0, code 0), 8.8.8.8->88.xxx.xxx.182, NAT 8.8.8.8->88.xxx.xxx.182
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
2 ADS 0.0.0.0/0 62.3.80.17 1
3 DS 0.0.0.0/0 62.3.80.17 2
4 ADC 62.3.80.17/32 88.xx.xx.182 pppoe-out2 0
pppoe-out1
/ip route
add distance=1 gateway=pppoe-out1
add distance=2 gateway=pppoe-out2
Previously I disabled it on both PPPoE connections and added them manually for both. Is that wrong?When you tried static routes before, did you disable adding default routes in PPPoE clients? If you disable it just for WAN2, you'll have only one default route, but still using the same default gateway reachable using both connections.
/ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip,
b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
0 A S dst-address=0.0.0.0/0 gateway=pppoe-out1 gateway-status=pppoe-out1 reachable
distance=1 scope=30 target-scope=10 routing-mark=wan1-route
1 A S dst-address=0.0.0.0/0 gateway=pppoe-out2 gateway-status=pppoe-out2 reachable
distance=1 scope=30 target-scope=10 routing-mark=wan2-route
2 A S dst-address=0.0.0.0/0 gateway=pppoe-out1 gateway-status=pppoe-out1 reachable
distance=1 scope=30 target-scope=10
3 S dst-address=0.0.0.0/0 gateway=pppoe-out2 gateway-status=pppoe-out2 reachable
distance=2 scope=30 target-scope=10
4 ADC dst-address=62.3.80.17/32 pref-src=88.0.0.182 gateway=pppoe-out2,pppoe-out1
gateway-status=pppoe-out2 reachable,pppoe-out1 reachable distance=0 scope=10
Link?I found another forum post about it, it seems to be a long standing bug..
I'm guilty myself. It's not that I'm completely against it, but the problem with IPSec in tunnel mode is that you need to specify policies for all subnets at both sides that should use the tunnel and keep them updated. But if you create tunnel using GRE and encrypt it using IPSec in transport mode, then it's "set it & forget it". You can then change subnets as you wish and it's just normal routing. It can save a lot of headaches.... recommend using GRE instead with IPSEC encryption.
Yes they do, but I need TWO rules, one for each direction in FORWARD chain?Yes, if you have two VLANs as interfaces, accept rules in forward chain is the way to let them talk to each other (if they have this router as gateway).
I understand - perfect thank you very much.Depends. If you want both to be equal, i.e. both able to initiate connection to other subnet, you need both. But if you'd want e.g. VLAN2 talk to VLAN5, but not the other way around, you need just one and other direction (replies) would be allowed by "accept established & related" rule.
I understand completely, I have just made a throwawaymail.com address: godrotofri@housat.com - if you email me, I can email you back what I actually wanted to say.It looks like PMs are not available here. It's probably a good thing when you think about it. Imagine all those people spamming others with "I saw a post of yours from ten years ago about a problem that I think is remotely similar to mine, come to my thread and solve it for me!" But maybe it's just my not completely optimistic nature and it would not actually happen.