Skip to content

Networking and Firewalls

Posit servers talk to a lot of things: identity providers, databases, Git hosts, Package Manager, the Posit Package Service, data sources. When something "used to work", the cause is usually a firewall rule, a DNS change, or a proxy.

A worked example

A user reports:

I'm trying to push to Git from RStudio on Workbench. It worked last week, but now it times out: fatal: unable to access 'https://git.example.com/team/project.git/': Failed to connect to git.example.com port 443: Connection timed out. It works from my laptop.

"Works from my laptop" points at the path between the Workbench server and the Git server. Work from the server outward.

1. Can the server reach it at all?

From a Workbench terminal (or SSH on the server):

curl -v --max-time 10 https://git.example.com
*   Trying 10.20.30.40:443...
* Connection timed out after 10001 milliseconds

It resolves the IP and tries to connect, but never gets a response.

2. Does DNS resolve correctly?

getent hosts git.example.com
dig +short git.example.com

If the server resolves a different IP than your laptop, the problem is DNS (split horizon, stale records, wrong resolver in /etc/resolv.conf).

3. Is the port reachable?

nc -zv -w 5 git.example.com 443
Ncat: TIMEOUT.

ICMP (ping) is often blocked even on healthy networks, so do not read much into 100% packet loss. A TCP timeout on 443 is the meaningful signal.

4. Is a proxy involved?

env | grep -i _proxy
git config --show-origin --get-all http.proxy

If the server must use a proxy and the user's session does not have one set (or has a stale one), connections time out. Set proxies centrally in /etc/rstudio/env-vars (forwarded to Job Launcher sessions) or /etc/profile.d/, not per user.1

Diagnosis

DNS resolves, but TCP to 443 times out from the server and works from the laptop. That is a network ACL or firewall between the Workbench subnet and the Git server, not a Git problem. Open a ticket with the network team that includes:

  • Source: Workbench server IPs (hostname -I)
  • Destination: git.example.com (10.20.30.40), TCP 443
  • Evidence: the curl -v and nc -zv output and timestamps

On a load balanced Workbench, test from every node; a rule may only cover one.

Ports

See Ports for the full table. Check what is listening:

sudo ss -tlnp | grep -E 'rserver|rstudio|connect|rspm'

Check the host firewall:

sudo firewall-cmd --list-all

Cloud deployments also have network security groups or security groups outside the VM. ss showing a listener and firewall-cmd showing the port open does not prove the port is reachable from clients.

DNS

cat /etc/resolv.conf
resolvectl status 2>/dev/null || nmcli dev show | grep DNS

Managed PostgreSQL behind a private endpoint needs the VM to use a resolver that knows the private zone. For example, Azure Database for PostgreSQL Flexible Server2, RDS with a Route 53 private hosted zone.3 The symptom is:

psql: error: could not translate host name "postgres.example.com" to address: Name or service not known

and, in Package Manager or Connect logs, a database connection failure followed by a clean exit and a restart loop. Fix DNS (or the private DNS zone link), not the product.

Outbound access the products need

Product Destination Why
All www.wyday.com:443 Online license activation (not needed with license-file activation)4
Package Manager rspm-sync.rstudio.com:443 Package metadata, binaries, and files4
Connect IdP endpoints OIDC discovery and token exchange5
Connect verify.pct.posit.co:443 URL validation for Public Access content (Enhanced/Advanced licenses); proxies must not strip the X-Content-Signature or Date headers6
Workbench and Connect Package Manager Package installs
Workbench Git hosts, data sources User work

Tools

Need Script
Interfaces, DNS, listening ports, firewall, SELinux posit-host
Configured and listening ports, addresses per product posit-workbench, posit-connect, posit-pm
Workbench to launcher settings posit-workbench
PostgreSQL reachability test-postgres-connectivity