Hello,
I am trying to setup a GRE tunnel with ExtraIP.com. They provide a few documents about different firewalls, but not fortigate.
I've setup a tunnel with the following config:
config system gre-tunnel
edit "ExtraIP"
set interface "VLAN100" //VLAN 100 is my WAN connection from my provider
set remote-gw (REMOTE GW OF EXTRAIP)
set local-gw (MY PUBLIC IP)
next
end
config system interface
edit "ExtraIP"
set type tunnel
set interface "ExtraIP"
set allowaccess ping
set alias "ExtraIP GRE"
set ip (SECOND IP OF /29)/32
next
end
When I check the diag sniffer with this command
diag sniffer packet wan1 "host (ExtraIP Gateway)" 4
I get only packets comming in, there are no packets going out
0.593645 VLAN100 in (ExtraIP GW) -> (My Public IP): gre: length 50 proto-800
1.929499 VLAN100 in (ExtraIP GW) -> (My Public IP): gre: length 70 proto-800
And when I assign port 443 via VIP and firewall policy to a linux server with nginx, I get ERR_CONNECTION_TIMED_OUT
Can anyone help me troubleshoot, I've been busy for over 2 hours without any luck
Hi Jesper
Did you configure the required routes and firewall policies?
You can take example from this tech tip.
Hi AEK,
I do have a route with destination the ExtraIP Gateway, that is routed through vlan100 (WAN).
I don't want my servers talking to the outside world with the extra ip's, I only want some HTTPS servers being port-forwarded. The servers can talk with my ISP public ip to the outside world, so I have no 0.0.0.0 route to the extraip tunnel.
What I do have working is that on my local pc, I am able to go to the first available IP in my subnet and my webserver is reachable. but to the outside world it is not available.
I have the following firewall rules:
LAN to ExtraIP
ExtraIP to LAN
Do I need to add these as well, or does this not matter:
ExtraIP to VLAN100
VLAN100 to ExtraIP
What do you get when you run these commands?
get router info routing-table all # check if you see the GRE route
diag sys gre list
diag netlink interface list | grep -A1 "ExtraIP"
get router info routing-table all:
S 185.216.160.***/32 [10/0] via 62.45.(ISP GATEWAY), VLAN100 <--- ExtraIP Gateway
S 185.216.161.***/29 [10/0] is directly connected, ExtraIP <---- My subnet
diag sys gre list:
IPv4:
vd=0 devname=ExtraIP devindex=21 ifindex=24
saddr=185.216.161.(My Subnet) daddr=185.216.160.(Remote ExtraIP) ref=0
key=0/0 flags=0/0 dscp-copy=0 diffservcode=000000
RX bytes:4820535 (4.5 Mb) TX bytes:14344 (14.0 kb);
RX packets:61343, TX packets:170, TX carrier_err:2 collisions:0
npu-info: asic_offload=0, enc/dec=0/0, enc_bk=0/0/0, dec_bk=0/0/0
total tunnel = 1
diag netlink interface list | grep -A1 "ExtraIP":
if=ExtraIP family=00 type=778 index=24 mtu=1476 link=0 master=0
ref=12 state=start present fw_flags=0 flags=up p2p run noarp multicast
Created on 05-07-2025 03:54 AM Edited on 05-07-2025 04:00 AM
If I do the following:
diag sniffer packet any 'host (FIRST USABLE IP HERE)' 4
And visit that IP from my mobile with 5G internet,
I do see incomming packets from my 5g internet to that first usable ip incomming, but it still gives me a ERR_CONNECTION_TIMED_OUT.
Even though there is a firewall rule, ExtraIP -> Server Network that has a VIP in destination with 443 linking to a IP that works with 443.
Try with diag debug flow and it should reveal why the traffic is blocked.
diag debug enable
diag debug flow filter addr ...
diag debug console timestamp enable
diag debug flow show function-name enable
diag debug flow show iprope enable
diag debug flow trace start 100
Here is a the output of that.
This is what chatgpt says, don't know if it is accurate:
:white_heavy_check_mark: DNAT works:
185.216.161.122:443 → 10.81.20.50:443
:white_heavy_check_mark: SNAT works (return path uses correct public IP):
10.81.20.50 → 77.63.116.194 gets SNAT'ed as 185.216.161.122
:white_heavy_check_mark: Routing works:
FortiGate routes outbound via VLAN100, which is what you intended.
:pushpin: BUT... despite all this, the client never receives the SYN-ACK.
:magnifying_glass_tilted_left: What's wrong?
The packet is being sent twice out from the firewall:
ipd_post_route_handler ... out VLAN100
But the client doesn’t receive the SYN-ACK.
Now I am getting this error:
"reverse path check fail" means there is no route back to the source IP.
That's normal because you don't have a route to client IP through the GRE tunnel.
User | Count |
---|---|
2551 | |
1356 | |
795 | |
646 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.