Proxy IPs (beta)
You can securely connect with resources in your private network using Modal Proxy IPs. Proxy IPs are a secure tunnel between Apps and exit nodes with static IPs. You can allow-list those static IPs in your network firewall, making sure that only traffic originating from these IP addresses is allowed into your infrastructure.
Proxy IPs are unique and not shared between workspaces. All traffic between your Apps and the Proxy IP server is encrypted using Wireguard.
Proxy IPs are in beta. Please let us know if you run into issues.
Creating Proxy IPs
Proxy IPs are available for Team Plan users.
You can create Proxy IPs in your workspace Settings page. There’s a limit of one IP per workspace. Please reach out to support@modal.com if you need more than one Proxy IP.
Using Proxy IPs
After a Proxy IP is online, copy its IP address from the Settings page and use
it in a Modal Function with the experimental argument _experimental_proxy_ip=<your-proxy-ip>
:
import modal
import subprocess
app = modal.App(image=modal.Image.debian_slim().apt_install("curl"))
@app.function(_experimental_proxy_ip="<your-proxy-ip>")
def my_ip():
subprocess.run(["curl", "-s", "ifconfig.me"])
@app.local_entrypoint()
def main():
my_ip.remote()
All network traffic from your Function will now use the Proxy IP as a tunnel.
The program above will always print the same IP address independent of where it runs in Modal’s infrastructure. If that same program were to run without a Proxy IP, it would print a different IP address depending on where it runs.