Community discussions

Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Wed Oct 26, 2011 9:32 pm

Can't ping past Vlan over GRE!

Thu Sep 17, 2015 5:34 pm

I have a setup where I'm managing some devices behind a GRE IPSEC tunnel. I can ping the VLAN interface itself, but anything behind it I can't ping. I've pasted in my scrubbed config below. Any assistance would help.
set [ find default-name=ether1 ] comment="Springs @ Estero"
set [ find default-name=ether3 ] comment="WAN to T3"
/interface gre
add !keepalive local-address=68.x.x.6 name=gre-tun1-sae remote-address=\
/ip neighbor discovery
set ether1 comment="LAN"
set ether3 comment="WAN"
/interface vlan
add comment=S@E-Management interface=ether1 l2mtu=1576 name=VID10 vlan-id=10
add comment=S@E-Customer-Hotspot interface=ether1 l2mtu=1576 name=VID100 \
add comment=S@E-Clubhouse interface=ether1 l2mtu=1576 name=VID200 vlan-id=200
/ip neighbor discovery
set VID10 comment=S@E-Management
set VID100 comment=S@E-Customer-Hotspot
set VID200 comment=S@E-Clubhouse
/ip hotspot profile
set [ find default=yes ] login-by=mac
/ip hotspot user profile
add name=10/10 rate-limit=10240K/10240K
add name=20/20 rate-limit=20480K/20480K
add name=5/5 rate-limit=5120K/5120K
add name=15/15 rate-limit=15360K/15360K
add name=50/20 rate-limit=20480K/50000K
add name=100/50 rate-limit=50000K/100000K
/ip pool
add name=S@E ranges=
add name=S@E-Clubhouse ranges=
/ip dhcp-server
add address-pool=S@E disabled=no interface=VID100 lease-time=1h name=S@E
add address-pool=S@E-Clubhouse disabled=no interface=VID200 lease-time=3d name=\
/ip hotspot
add address-pool=S@E addresses-per-mac=1 disabled=no interface=VID100 name=S@E
set 0 name=serial0
set 1 name=serial1
/queue type
add kind=pcq name=PCQ_Download pcq-classifier=dst-address \
    pcq-dst-address6-mask=64 pcq-rate=100M pcq-src-address6-mask=64
add kind=pcq name=PCQ_Upload pcq-classifier=src-address,dst-address \
    pcq-dst-address6-mask=64 pcq-rate=100M pcq-src-address6-mask=64
/queue simple
add name=queue1 queue=PCQ_Upload/PCQ_Download target=
/snmp community
set [ find default=yes ] name=lookatit write-access=yes
/ip address
add address=68.x.x.6/30 comment=WAN interface=ether3 network=68.x.x.4
add address=68.x.x.1/27 comment="S@E NAT" interface=ether3 network=\
add address= comment="S@E Customer" interface=VID100 network=\
add address= comment="S@E CLubhouse" interface=VID200 network=\
add address= interface=gre-tun1-sae network=
add address= interface=VID10 network=
/ip dhcp-server network
add address= comment="hotspot network" gateway=
add address= gateway=
/ip dns
set servers=,
/ip firewall address-list
add address=207.x.x.0 list=Support
add address= list=Support
add address=207.x.x.3 comment=CDG list=Support
add address= comment="Self-Identification [RFC 3330]" list=bogons
add address= comment="Loopback [RFC 3330]" list=bogons
add address= comment="Link Local [RFC 3330]" list=bogons
add address= comment="Reserved - IANA - TestNet1" list=bogons
add address= comment="6to4 Relay Anycast [RFC 3068]" list=bogons
add address= comment="NIDB Testing" list=bogons
add address= comment="Reserved - IANA - TestNet2" list=bogons
add address= comment="Reserved - IANA - TestNet3" list=bogons
add address= comment=\
    "MC, Class D, IANA # Check if you need this subnet before enable it" \
    disabled=yes list=bogon
add address=207.x.x.9 list=Support
add address=207.x.x.5 comment=Observium list=support
add address=207.x.x.5 list=Support
/ip firewall filter
add chain=input src-address-list=Support
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
add action=add-src-to-address-list address-list=Syn_Flooder \
    address-list-timeout=30m chain=input comment="Add Syn Flood IP to the list" \
    connection-limit=30,32 protocol=tcp tcp-flags=syn
add action=drop chain=input comment="Drop to syn flood list" src-address-list=\
add action=add-src-to-address-list address-list=Port_Scanner \
    address-list-timeout=1w chain=input comment="Port Scanner Detect" protocol=\
    tcp psd=21,3s,3,1
add action=drop chain=input comment="Drop to port scan list" src-address-list=\
add action=jump chain=input comment="Jump for icmp input flow" jump-target=ICMP \
add action=drop chain=input comment="Block all access to the winbox - except to \
    \_ADDRESS LIST" dst-port=8291 protocol=tcp src-address-list=!support
add action=jump chain=forward comment="Jump for icmp forward flow" jump-target=\
    ICMP protocol=icmp
add action=drop chain=forward comment="Drop to bogon list" dst-address-list=\
add action=add-src-to-address-list address-list=spammers address-list-timeout=\
    3h chain=forward comment="Add Spammers to the list for 3 hours" \
    connection-limit=30,32 dst-port=25,587 limit=30/1m,0 protocol=tcp
add action=drop chain=forward comment="Avoid spammers action" dst-port=25,587 \
    protocol=tcp src-address-list=spammers
add chain=input comment="Accept DNS - UDP" port=53 protocol=udp
add chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
add chain=input comment="Accept to established connections" connection-state=\
add chain=input comment="Accept to related connections" connection-state=\
add chain=input comment="Full access to SUPPORT address list" src-address-list=\
add chain=ICMP comment="Echo request - Avoiding Ping Flood" icmp-options=8:0 \
    limit=1,5 protocol=icmp
add action=drop chain=input comment="Drop anything else! # DO NOT ENABLE THIS RU\
add chain=ICMP comment="Echo reply" icmp-options=0:0 protocol=icmp
add chain=ICMP comment="Time Exceeded" icmp-options=11:0 protocol=icmp
add chain=ICMP comment="Destination unreachable" icmp-options=3:0-1 protocol=\
add chain=ICMP comment=PMTUD icmp-options=3:4 protocol=icmp
add action=jump chain=output comment="Jump for icmp output" jump-target=ICMP \
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" \
add action=src-nat chain=srcnat comment="S@E NAT" src-address= \
/ip hotspot user
add name=admin
/ip ipsec peer
add address=207.x.x.9/32 enc-algorithm=aes-128 nat-traversal=no
/ip ipsec policy
set 0 disabled=yes
add dst-address= sa-dst-address=207.x.x.9 sa-src-address=\
    68.x.x.6 src-address= tunnel=yes
/ip route
add distance=1 gateway=68.x.x.5
add distance=1 dst-address=207.x.x.0/32 gateway=
/romon port
add disabled=no
set enabled=yes
/system clock
set time-zone-name=America/New_York
/system identity
set name=FTMFLCCR01
/system leds
set 0 type=interface-speed
set 2 type=interface-speed
/system routerboard settings
set cpu-frequency=1200MHz memory-frequency=1066DDR protected-routerboot=\
/tool sniffer
set file-name=GRE filter-interface=gre-tun1-sae memory-limit=1000KiB
User avatar
Posts: 520
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: Can't ping past Vlan over GRE!

Thu Sep 17, 2015 7:05 pm

i am just guessing from your configuration what could be on the other side of the GRE.

/ip route
add distance=1 dst-address=207.x.x.0/32 gateway=

you config says, that there is only the 207.x.x.0/32 (a single host) on the other side of the GRE.
[you could have used gateway=GRE as well]

i guess there should be a lot more hosts on the other end of the GRE tunnel. so this could be one source of the problem.

you use a GRE tunnel and you use IPSEC tunnel-mode. this is not efficient. if you configure a GRE tunnel, you should use IPSEC transport mode, but not inside the tunnel, but outside, like this:

/ip ipsec policy
disable 1 //this disables your previous policy
add dst-address=207.x.x.9 sa-dst-address=207.x.x.9 sa-src-address=\
68.x.x.6 src-address=68.x.x.6 tunnel=no protocol=gre

(encrypt all GRE traffic between the tunnel source and tunnel end)

the upper rule will encrypt your tunnel from the outside (e.g. all GRE encapsulated packets will receive an IPSEC encryption). then you can use simple /ip route statements to direct traffic through the tunnel as you'd do with any normal interface.

just some addition to this rule in your firewall filters:

add chain=input comment="Accept DNS - UDP" port=53 protocol=udp
add chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
if you accidentally enable "accept remote queries" in DNS, you will be an open resolver. use input-interface checking for accepts like these. normally your DNS requests will create a connection, so the replies will be safely pass the FW if you have a permit established rule at the 1st place of the input chain.
also, UDP/123 (a.k.a NTP) can be a PITA nowadays, so unless your drop everything what's was not permitted before, pay attention to filter incoming NTP packets. your NTP requests are however safely handled by the accept established rule.
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Wed Oct 26, 2011 9:32 pm

Re: Can't ping past Vlan over GRE!

Thu Sep 17, 2015 7:53 pm

I changed the Tunnel but that didn't seem to do it. I'll have a look around, it might be in my firewall rules.

Here is one end
src-address=207.x.x.29/32 src-port=any dst-address=68.x.x.226/32 dst-port=any protocol=gre action=encrypt 
       level=require ipsec-protocols=esp tunnel=no sa-src-address=207.x.x.29 sa-dst-address=68.x.x.226 proposal=Florida 
And here is the other
src-address=68.x.x.226/32 src-port=any dst-address=207.x.x.29/32 dst-port=any 
       protocol=gre action=encrypt level=require ipsec-protocols=esp tunnel=no 
       sa-src-address=68.x.x.226 sa-dst-address=207.x.x.29 proposal=default priority=0
Posts: 484
Joined: Wed Apr 02, 2008 2:12 pm
Location: Minnesota USA

Re: Can't ping past Vlan over GRE!

Fri Sep 18, 2015 12:59 am

Have you tried using an EoIP connection instead of a GRE? :D
MTCNA - 2011

" The Bitterness of Poor Quality Remains Long After the Sweetness of Low Price is Forgotten "

Frequent Visitor
Frequent Visitor
Topic Author
Posts: 73
Joined: Wed Oct 26, 2011 9:32 pm

Re: Can't ping past Vlan over GRE!

Fri Sep 18, 2015 4:26 pm

Have you tried using an EoIP connection instead of a GRE? :D
While I've considered it, It's not the technology we want to implement in this case.

I don't think it's the GRE causing the problem, I think it's a problem with my routing or firewall. I can ping the IP address of the VLAN 10 interface, but I cannot ping PAST that. So I can ping but I can't ping, .1 is local to the router, .2 is a switch in VLAN 10 directly connected to Ether 1.

I know .2 is alive because I can telnet to it from the Mikrotik.

Who is online

Users browsing this forum: No registered users and 9 guests