Domain IP for Osticket API

Dear Community,

I am trying to find a solution since 4 days but I could not.
My Issue: Since I use Cloudflare (before it was working fine) the API-Keys of OSTicket are not working anymore because I have to enter the Domain-IP of the Domain where the API will be used. In my case it is the Domain:

betailor.de

where I want to use the API.

But the issue is Cloudflare uses two IPs:
299 IN A 104.27.150.91
299 IN A 104.27.151.91

and both are not working also when I enter as IP: 104.27.*.91

Thats what the Field IP-Adress of OSTicket accepts:

IP ( 1.2.3.4 )
compares with source ip

IP Wildcard ( 1.2.*.* )
wildcard matched against source ip

IP Regex ( regex:/^123.\d{1,3}.789.0$/ )
regex matched against source ip

Hostname ( hostname:some.example.domain.com )
dns look up domain, comapres with source ip ( this option works for dynamic dns setups )

Hostname Wildcard ( hostname:*.*.example.domain.com )
reverse dns lookup on source ip, wilcard matched against looked up domain

Hostname Regex ( hostname:regex:/\w+?\.example(\.domain)?\.com/i )
reverse dns lookup on source ip, then regex matched against looked up domain

Question: Why is the IP not working and which of the above can I use to make it work again? Do I may have to change some Cloudflare settings?

Thank you very much for you help! :slight_smile:

Hi @user5027,

I use the OsTicket API and use Cloudflare on my site. I restore IP addresses on the server (contact your host about this) so that I can enter the actual IP of my server there.

https://support.cloudflare.com/hc/en-us/sections/200805497-Restoring-Visitor-IPs

ok they activated the mod but which IP do I have to enter? As there are two IPs:
299 IN A 104.27.150.91
299 IN A 104.27.151.91

If you are now restoring IPs, you should enter the actual IP of your server. not Cloudflare’s IP.

ok still is not working :frowning:
Host had already activated the mod_remoteip or mod_Cloudflare.
But is it normal that the “DNS look up” still is showing Cloudflare IPs:
299 IN A 104.27.150.91
299 IN A 104.27.151.91

and not the Webhoster IP: 195.30.85.100

Does the DNS Lookup of your Domain also show the Cloudflare IPs?

The DNS lookup will still show Cloudflare’s IPs, yes - this is the same on my domain too. What mod_remoteip does is to retrieve the actual IP address that the request originated from. This is expected. If that is working as it should, (you could check your server logs or ask your host to, to see if traffic is now showing as coming from its actual IP and not a Cloudflare IP) then osTicket should see the actual IP.

What you can do is pause Cloudflare on your site from the Overview tab of the Cloudflare Dashboard, bottom right under Advanced Actions, leave it to propagate and see if it works then. You can then see if it is working normally without Cloudflare and therefore see if there is an issue with mod_remoteip or something else.

cf_pause

Thank you very much mate! You helped me a lot! Now mod_remoteip solved the problem.

1 Like

No problem, glad it is working for you :slight_smile: