VPN, Docker, and a cold coffee
dev.to·14w·
Discuss: DEV

Today I had a hard time understanding why my VPN was connected but I couldn’t reach my DB sitting just behind it.

Very simple situation:

  • you launch your PC, coffee’s hot
  • start your VPN
  • open your code and do some stuff
  • need to check something in a tool protected by the VPN
  • hu ho, why can’t I reach the site?
  • check the VPN logs — nothing weird
  • double-check the VPN config
  • recreate a VPN user
  • try with another Wi-Fi
  • coffee’s cold

Then I reboot my PC, connect to the VPN… and suddenly the site works.

Why that?

“Simply” because of Docker! More specifically: Docker networks.

When I launched Docker, it created a network using the same IP range as my VPN.

We can confirm the problem with a few commands.

ip route show (while connected to the VPN) gives us an idea of…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help