I dont give a crap about your references, what is needed is your full config here…!!!
(minus any public WANIP info of course).
Comments:
FIREWALL RULES SUCK, in a number of way.
- First disorganized and thus hard to follow, put all input chain rules together and then forward chain rules. Better for all!! \
- get rid of the crap rules…
- stick to default type rules and clean/clear rules
Fixed below… order counts within a chain as well.
/ip firewall filter
{input chain}
add action=accept chain=input comment="Allow Estab, 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=accept chain=input comment="Allow l2tp/ipsec IKE (500)" dst-port=\
500 in-interface-list=WAN protocol=udp
add action=accept chain=input comment="Allow l2tp (1701)" dst-port=1701 \
in-interface-list=WAN protocol=udp
add action=accept chain=input comment="Allow l2tp/ipsec NAT (4500)" dst-port=\
4500 in-interface-list=WAN protocol=udp
add action=accept chain=input comment="Allow l2tp/ipsec vpn (ipsec-esp)" \
in-interface-list=WAN protocol=ipsec-esp
add action=accept chain=input comment="Allow BASE" in-interface-list=BASE
add action=accept chain=input comment="Allow VLAN" dst-port=53 \
in-interface-list=VLAN protocol=tcp
add action=accept chain=input comment="Allow VLAN" dst-port=53 \
in-interface-list=VLAN protocol=udp
add action=drop chain=input comment="[color=#0000FF]Drop all else"[/color][/b]
{forward chain}
add action=accept chain=forward comment="Accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="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=input comment="Allow Estab, Related & Untracked" \
connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=accept chain=forward comment="VLAN Internet Access only" \
in-interface-list=VLAN out-interface-list=WAN
add action=accept chain=forward connection-nat-state=dstnat
add action=drop chain=forward comment="Drop all else"
NOTES:
(1) This rule I could not make heads or tails of especially as there is no subnet on the router that I can see (192.168.0.0/24)… Please let us know what the intent of this rule actually is, from the user perspective.
add action=accept chain=input comment=
“Accept all from LAN works with drop input” in-interface=BR1
add action=accept chain=input comment=“Accept ssh to subnet” dst-address=
192.168.1.0/24 dst-port=22 protocol=tcp src-address=192.168.0.0/24
IF this is indeed an ipsec address or subnet you have given your vpn then this should be in the FORWARD chain as it appears you want people coming in on ipsec to be able to access the BLUE VLAN ???
(2) These rules I could not make heads or tails of as you appear to be giving access from one thing to itself and is the case for both rules actually. ???
add action=accept chain=forward comment=“Forward l2tp/ipsec remote client”
dst-address=192.168.1.0/24 in-interface=all-ppp src-address=
192.168.1.0/24
add action=accept chain=forward comment=“Forward l2tp/ipsec remote client”
dst-address=192.168.1.0/24 out-interface=all-ppp src-address=
192.168.1.0/24
(3) This rule is TOO wide open, it has no destination detailed…
add action=accept chain=forward in-interface=BR1 src-address=192.168.1.0/24 missing dst-address? dst-address-list? out-interface? out-interface-list?
(4) This looks like a destination NAT rule and not a port forward rule!!
add action=accept chain=forward dst-address=10.0.20.2 dst-port=1195
in-interface-list=WAN protocol=udp
(5) This rule make no sense to me… you are again allowing BLUE VLAN to be accessed by WAN, sounds like destination NAT.
add action=accept chain=forward comment=“forward openVPN to Zentyal”
dst-address=192.168.1.1 dst-port=1196 in-interface=pppoe-out1 protocol=udp
also in one rule you use wan interface list, here you use the actual interface why the inconsistency??
(6) I left out this rule on the input chain as well, as I dont see its purpose, it appears to be very non-standard…???
add action=accept chain=input comment=“Site2Site VPN” dst-address=
XXX.XXX.177.63 in-interface-list=WAN src-address=XXX.XXX.43.161
(7) Suggest your remove this setting as your IP DHCP Client is handled by PPPOE settings!!
/ip dhcp-client
add interface=ether1
(8) I am not very familiar with how to source nat your LAN traffic going out the ipsec tunnel but this does not appear correct to me. I appreciate it mirrors your ipsec policy though!!
/ip firewall nat
add action=accept chain=srcnat dst-address=192.168.0.0/24 src-address=
192.168.1.0/24
Perhaps use out-interface=vpn or out-interface=isipos ??? I am out on left field on this one.
(9) DST NAT RULES are not consistently applied.
I see you two rules missing the standard dynamic IP in-interface-list=WAN while the other two use a static IP approach which is not correct for pppoe unless its a static IP??? ( dst-address=94.21…)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Summary: This should be a starting point, If you are still having issues then lets tackle your mangle rules next. Why do you need them??