R
Railway13mo ago
Charbel

Is it possible to whitelist IPs on railway?

I want to setup cloudflare and then only allow cloudflare to make API requests to my backend hosted on railwat. Where can I add which IPs can only access the backend?
12 Replies
Percy
Percy13mo ago
Project ID: N/A
Charbel
CharbelOP13mo ago
N/A
Fragly
Fragly13mo ago
You can find all the IPs for a specific region here: https://utilities.up.railway.app/cidr-list?value=us-west1
Charbel
CharbelOP13mo ago
my question is how to block any incoming request if it's not from cloudflares IPs, directly on railway rather than my app itself (just like you can whitelist IPs on Ec2 instances etc..)
Fragly
Fragly13mo ago
ooh I see what you mean I don't think there's a place where you can do that on railway if not on your app
Charbel
CharbelOP13mo ago
I see :/
Brody
Brody13mo ago
fragly is correct, railway does not offer any firewall rules, this is something your app needs to handle
Charbel
CharbelOP13mo ago
if im not wrong adding cloudflare is enough, if I only use my cloudflare custom domain I can add rules on there, and no one can bypass them
Brody
Brody13mo ago
doesnt stop someone from accessing the railway domain of your app though
Charbel
CharbelOP13mo ago
I believe I can remove the default generate railway domain that way I force everyone to use my custom domain through cloudflare
Brody
Brody13mo ago
you can still access the railway app via a railway domain, the cname value railway gives you but thats random so it should be sufficient just something to keep in mind
Charbel
CharbelOP13mo ago
oh okay
Want results from more Discord servers?
Add your server