Best Antivirus With Ransomware Protection and VPN (What Actually Matters)

Ransomware attacks and online privacy concerns are no longer edge cases — they’re everyday risks for anyone who uses email, downloads files, or connects to public Wi-Fi. That’s why many people search for an antivirus that includes strong ransomware protection and a VPN.

But not all “antivirus + VPN” claims mean the same thing.

This guide explains what those tools actually do, where they overlap, where they don’t — and how to choose the right setup for your situation.


Why People Look for Antivirus + VPN Together

Most modern infections don’t come from obviously malicious files anymore. They come from:

  • Phishing emails

  • Fake software updates

  • Malicious ads

  • Compromised websites

  • Public Wi-Fi networks

A good antivirus helps detect and stop malware on your device, while a VPN helps protect your internet traffic and identity as you browse. Together, they create layered protection — but only if you understand what each layer actually does.


What “Ransomware Protection” Really Means

Not all antivirus software handles ransomware the same way.

True ransomware protection usually includes:

  • Behavior-based detection (not just known virus signatures)

  • Folder or file protection to stop unauthorized encryption

  • Process monitoring that blocks suspicious activity in real time

  • Rollback or recovery tools (in some suites)

Basic antivirus may still catch ransomware — but often after damage has begun. Dedicated ransomware defenses aim to stop encryption before your files are locked.

No software can guarantee 100% protection, but higher-end suites significantly reduce risk.


What a VPN Adds (and What It Doesn’t)

A VPN encrypts your internet connection and hides your IP address. This helps with:

  • Public Wi-Fi safety

  • Preventing traffic snooping

  • Reducing exposure to malicious networks

  • Basic privacy from ISPs and trackers

A VPN does not:

  • Scan your computer for malware

  • Stop ransomware once it’s running locally

  • Replace antivirus protection

Think of a VPN as reducing how often you’re exposed to danger — not as a cure if something gets through.


All-in-One Security Suite vs Separate Tools

Option 1: All-in-One Security Suites

Pros

  • One subscription

  • Centralized dashboard

  • Easier setup

  • Built-in ransomware protection

Cons

  • VPNs may be simpler than standalone providers

  • Fewer advanced privacy controls

Option 2: Standalone VPN + Dedicated Antivirus

Pros

  • Strongest privacy and encryption

  • Best-in-class malware engines

  • More flexibility

Cons

  • Two subscriptions

  • Slightly more setup

Neither option is “better” universally — it depends on your priorities.


Best Antivirus Options That Include Ransomware Protection and a VPN

NordVPN is not a traditional antivirus — and that’s important to understand.

What NordVPN offers

  • Top-tier VPN with strong encryption and privacy

  • Threat Protection Pro:

    • Blocks malicious websites

    • Scans downloads

    • Prevents many web-based malware vectors

    • Blocks ads and trackers

What it does not offer

  • Full system antivirus scans

  • Deep file-level ransomware remediation

Best use case
NordVPN works best when paired with a real antivirus like Norton or Bitdefender, especially for people who care deeply about privacy and travel or use public Wi-Fi frequently.

Norton 360

Norton 360 is one of the most complete consumer security suites available.

What it does well

  • Full antivirus with strong ransomware protection

  • Real-time threat monitoring

  • VPN included in most plans

  • Firewall, password manager, and backup tools

Best for
People who want one tool that does everything with minimal configuration.


Bitdefender Total Security

Bitdefender is frequently praised for its malware and ransomware detection rates.

What it does well

  • Industry-leading ransomware defense

  • Lightweight performance impact

  • Advanced behavior monitoring

  • VPN included (often with data limits unless upgraded)

Best for
Users who prioritize maximum protection strength, even if the VPN is secondary.


McAfee Total Protection

McAfee focuses heavily on multi-device and family coverage.

What it does well

  • Antivirus with ransomware protection

  • VPN included (often unlimited)

  • Identity and privacy monitoring

  • Covers many devices under one plan

Best for
Households or users protecting multiple devices under one subscription.


Best Choices by Use Case

  • Best all-in-one solution: Norton 360

  • Best ransomware protection: Bitdefender Total Security

  • Best privacy-first setup: NordVPN + a full antivirus

  • Best for families: McAfee Total Protection

  • Best for non-technical users: A single security suite with automatic protection


Common Mistakes to Avoid

  • Assuming a VPN alone stops ransomware

  • Choosing based only on price

  • Ignoring renewal costs

  • Forgetting device compatibility

  • Not backing up important files

Security tools reduce risk — backups reduce damage. You want both.


Quick FAQs

Do I still need ransomware protection if I back up my files?
Yes. Backups help recovery, but ransomware can still disrupt work and expose data.

Is free antivirus enough?
Usually not. Free tools often lack real-time ransomware defenses and VPNs.

Does antivirus slow down your computer?
Modern suites are optimized, though older or low-end systems may notice minor impact.

Can ransomware still happen even with protection?
Yes — but the likelihood and damage are significantly reduced.


How to Choose the Right Option for You

Ask yourself:

  • How many devices do I need to protect?

  • Do I use public Wi-Fi often?

  • Do I want simplicity or maximum control?

  • Is privacy or convenience more important?

  • Am I okay managing two tools?

Answering those questions usually makes the right choice obvious.


Final Takeaway

There’s no single “best” antivirus with ransomware protection and VPN for everyone.

What matters is layered protection:

  • A strong antivirus for device-level threats

  • Real ransomware defenses, not just basic scanning

  • A VPN for safer browsing and privacy

Choose the setup that fits how you actually use the internet — not just what sounds good on a feature list.

Jellyfin Media Server Installation (Docker on macOS)

This guide walks you through installing Jellyfin Media Server in a Docker container on macOS using Docker Desktop. This approach keeps Jellyfin fully isolated from your operating system while still allowing it to access your local media folders.

By the end of this guide, you’ll be able to stream your movies, TV shows, and music to any device in your home — and optionally access them remotely. If you want to install Jellyfin in Docker on Windows, be sure to use this alternative guide.


What is Docker?

Docker allows you to package and run applications inside lightweight, isolated containers. Instead of installing Jellyfin directly on macOS, we run it in a container that includes everything it needs. This results in a cleaner setup, simpler upgrades, easier backups, and a configuration that can be moved to another machine with minimal effort.


What is Jellyfin?

Jellyfin is an open-source media server that organizes and streams your local media files to phones, tablets, smart TVs, and web browsers. It automatically downloads metadata, artwork, and episode information to create a clean, Netflix-style interface for your personal media library.


Requirements

  • macOS (Intel or Apple Silicon)

  • Admin access

  • At least 8 GB RAM recommended

  • Internet connection


Step 1 – Install Docker Desktop on macOS

  1. Download Docker Desktop for Mac:
    https://www.docker.com/products/docker-desktop/

  2. Open the .dmg file and drag Docker.app into your Applications folder

  3. Launch Docker from Applications

  4. When prompted:

    • Allow system permissions

    • Approve background services

    • Enter your macOS password

  5. Wait until Docker shows:

    Docker Desktop is running

You can verify by opening Terminal and running:

docker version

Step 2 – Create Your Media & Config Folders

Choose where you want your media stored. A clean example:

/Users/yourname/Media/Movies
/Users/yourname/Media/TV
/Users/yourname/Media/Music
/Users/yourname/Jellyfin/Config
/Users/yourname/Jellyfin/Cache

Create them with Finder or via Terminal:

mkdir -p ~/Media/{Movies,TV,Music}
mkdir -p ~/Jellyfin/{Config,Cache}

Your structure should look like:

~/Media/
├─ Movies/
├─ TV/
└─ Music/
~/Jellyfin/
├─ Config/
└─ Cache/

Step 3 – Share Folders with Docker Desktop

This step is critical on macOS.

  1. Open Docker Desktop

  2. Go to Settings

  3. Click Resources → File Sharing

  4. Add:

    /Users/yourname/Media
    /Users/yourname/Jellyfin
  5. Click Apply & Restart

If you skip this, Docker will not be able to access your files.


Step 4 – Create the Docker Compose File

Open Terminal:

mkdir ~/jellyfin-docker
cd ~/jellyfin-docker
nano docker-compose.yml

Paste:

services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
ports:
- "8096:8096"
volumes:
- /Users/yourname/Jellyfin/Config:/config
- /Users/yourname/Jellyfin/Cache:/cache
- /Users/yourname/Media:/media
restart: unless-stopped

Important: Replace yourname with your actual macOS username.

Save and exit:

  • CTRL + X

  • Y

  • Enter


Step 5 – Start Jellyfin

From the same folder:

docker compose up -d

Verify:

docker ps

You should see a container named jellyfin running.


Step 6 – Initial Jellyfin Setup

Open a browser and go to:

http://localhost:8096

Then:

  1. Select your preferred language → Next

  2. Create admin username and password → Next

  3. Add Media Libraries:

    • Movies → /media/Movies

    • TV Shows → /media/TV

    • Music → /media/Music

  4. Keep defaults → Next

  5. Finish → Log in


Step 7 – Add Media

Copy your files into:

~/Media/Movies
~/Media/TV
~/Media/Music

Then inside Jellyfin:

  • Menu (☰) → Refresh Metadata

Your content will appear.


Step 8 – Play Jellyfin on Devices

Install Jellyfin on:

  • Apple TV

  • iPhone / iPad

  • Android TV

  • Smart TVs

  • Or use a web browser

When prompted for the server:

http://<your-mac-ip>:8096

Log in with the account you created.


Optional (But Strongly Recommended)

A) Hardware Transcoding on macOS

On Apple Silicon:

  • Jellyfin will use software transcoding inside Docker

  • Hardware acceleration is limited inside Docker on macOS

  • For heavy transcoding, a Linux host is preferred

On Intel Macs:

  • Quick Sync may be available, but support varies

  • Many users run Jellyfin in direct macOS installs for hardware acceleration

For most users: direct play works perfectly and transcoding is rarely needed.

Jellyfin Media Server Installation (Docker on Windows 10/11)

This guide walks you through installing Jellyfin Media Server in a Docker container on Windows 10/11 using Docker Desktop with the WSL2 backend. This approach keeps Jellyfin fully isolated from your main system while still giving it access to your Windows-based media folders.

By the end of this guide, you’ll be able to stream your movies, TV shows, and music to any device in your home — and optionally access them remotely. If you want to install Jellyfin in Docker on macOS, be sure to use this alternative guide.

What is Docker?

Docker lets you run applications in lightweight, self-contained environments called containers. Rather than installing Jellyfin directly on Windows, we run it inside a container that includes all required dependencies. This results in a cleaner setup, easier updates, simpler backups, and painless migrations.

What is Jellyfin?

Jellyfin is an open-source media server that organizes and streams your local media files to phones, TVs, tablets, and web browsers. It automatically fetches metadata, artwork, and episode info for a Netflix-like experience.


Requirements

  • Windows 10 or 11 (64-bit)

  • Admin access

  • At least 8 GB RAM recommended

  • Virtualization enabled in BIOS

  • Internet connection


Step 1 – Enable WSL2 on Windows

Open PowerShell as Administrator and run:

wsl --install

Reboot when prompted.

After reboot, confirm:

wsl --status

You should see Default Version: 2


Step 2 – Install Docker Desktop

  1. Download Docker Desktop for Windows:
    https://www.docker.com/products/docker-desktop/

  2. Run the installer

  3. Check “Use WSL2 instead of Hyper-V” when prompted

  4. Finish install and reboot

Open Docker Desktop and wait until it says “Docker is running”


Step 3 – Create Your Media & Config Folders

Choose where you want your media stored. Example:

D:\Media\Movies
D:\Media\TV
D:\Media\Music
D:\Jellyfin\Config
D:\Jellyfin\Cache

Create these folders in File Explorer.

Your structure should look like:

D:\
├─ Media\
│ ├─ Movies\
│ ├─ TV\
│ └─ Music\
└─ Jellyfin\
├─ Config\
└─ Cache\

Step 4 – Create the Docker Compose File

Open PowerShell or Command Prompt, then:

mkdir C:\jellyfin-docker
cd C:\jellyfin-docker
notepad docker-compose.yml

Paste this:

services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
ports:
- "8096:8096"
volumes:
- D:/Jellyfin/Config:/config
- D:/Jellyfin/Cache:/cache
- D:/Media:/media
restart: unless-stopped

Save and close.

Important:
Docker on Windows requires forward slashes in paths:
D:/Media NOT D:\Media


Step 5 – Start Jellyfin

From the same folder:

docker compose up -d

Verify:

docker ps

You should see jellyfin running.


Step 6 – Initial Jellyfin Setup

Open a browser and go to:

http://localhost:8096

or

http://<your-pc-ip>:8096

Then:

  1. Choose language → Next

  2. Create admin user → Next

  3. Add Media Libraries:

    • Movies → /media/Movies

    • TV Shows → /media/TV

    • Music → /media/Music

  4. Keep defaults → Next

  5. Finish → Log in


Step 7 – Add Media

Copy files into:

D:\Media\Movies
D:\Media\TV
D:\Media\Music

Then in Jellyfin:

  • Menu → Refresh Metadata

Your content will appear.


Play Jellyfin on Devices

Install Jellyfin on:

  • Android TV / Apple TV / Roku

  • iPhone / Android

  • Web browser

Log in using:

Server: http://<your-pc-ip>:8096
Username / Password

Optional (But Strongly Recommended) Improvements

A) GPU Hardware Transcoding (Windows)

If your PC has:

  • Intel iGPU

  • NVIDIA GPU

  • AMD GPU

Docker Desktop can pass through the GPU to Jellyfin.

This dramatically improves performance when streaming remotely.

Important: GPU support on Windows is still evolving and depends on WSL2 + driver support. If you tell me:

  • Your GPU model

  • Windows version

…I’ll give you the exact working config. (This part is very hardware-specific.)


B) Remote Access (Do Not Just Port Forward 8096)

If you want to stream outside your house, the clean options are:

  • Tailscale (easiest, zero ports)

  • Cloudflare Tunnel

  • Reverse proxy with HTTPS

I strongly recommend Tailscale for Windows users. It takes 3 minutes and avoids exposing your PC to the internet.

If you want, I can write that section cleanly as well.


C) Backups

Back up:

D:\Jellyfin\Config

That contains:

  • Users

  • Watch history

  • Libraries

  • Metadata

You can rebuild the container anytime if you have that folder.


D) Updating Jellyfin

From C:\jellyfin-docker:

docker compose pull
docker compose up -d
docker image prune -f

Running Kodi in Docker

Kodi is a lightweight media center that can run inside a Docker container, which makes it easy to install, update, and isolate from the rest of your system. With Kodi in Docker, you can keep your settings portable, map your local media library cleanly, and rebuild the container anytime without losing your configuration.

If you want to take it a step further, you can also run Kodi’s network traffic through a separate VPN container so it routes out over that tunnel while the rest of your machine stays normal. Here’s the guide to routing Docker apps through a VPN container (Windows/macOS)(link for Windows VPN Docker, link for MacOS VPN Docker)

What you’re building

  • A Kodi container you can manage like any other Docker app

  • A persistent Kodi config folder so your setup survives updates

  • Media library mounts so Kodi can scan your movies/TV/music

  • Optional: a path to route Kodi through a VPN container later

Note: Kodi is a “TV-style” app designed for a remote/UI. Running it in Docker is most useful when you’re either:

  • using a device/TV client to access the library over the network, or

  • running Kodi headless-ish for library management + remotes, or

  • using a container that exposes the UI over a web/VNC-style session (depends on the image).


Requirements

  • Docker installed (Docker Desktop on Windows/macOS, Docker Engine on Linux)

  • A folder for:

    • Kodi config (persistent)

    • Your media library (Movies/TV/Music)

  • Basic comfort running Docker commands or Compose


Folder layout (recommended)

Create a simple structure like:

  • kodi-docker/

    • docker-compose.yml

    • config/ (Kodi profile + settings live here)

    • media/ (or bind-mount your real media folder path)

Pull Kodi Image

docker pull linuxserver/kodi-headless

Add your media inside Kodi

Once Kodi is up:

  1. Go to Settings → Media → Library

  2. Add sources:

    • /media/movies

    • /media/tv

    • /media/music

  3. Pick the correct content type:

    • Movies → “Movies”

    • TV → “TV Shows”

  4. Let it scan and pull metadata

Tip: If your filenames aren’t clean, you’ll save hours by fixing naming first (Movie Title (Year), TV Show S01E01 format).


Persisting your setup (important)

Everything in ./config persists:

  • skin / UI choices

  • sources and library settings

  • addons and repositories

  • watched history (depending on your setup)

That means you can:

  • update the container image safely

  • rebuild the container

  • move the whole setup to another machine


Updating Kodi later

docker compose pull
docker compose up -d

How to Install Plex in a Docker Container

If you want a clean, portable, and easily maintainable Plex setup, running Plex in Docker is the best option. It keeps Plex isolated, makes upgrades trivial, and plays nicely with VPN containers, download clients, and other services. If you want to run Plex and route traffic via a VPN, click here for instructions.

This guide assumes:

  • Docker is already installed

  • You have a media directory on the host

Run in terminal:

docker pull plexinc/pms-docker:1.42.2.10156-f737b826c

Architecture

[ Plex Container ][ Host Network ][ LAN ][ Clients ]

Plex runs in its own container and exposes ports to the host.


Step 1 – Create Directories on the Host

You need:

  • One directory for Plex config

  • One (or more) for media

Example:

mkdir -p /docker/plex/config
mkdir -p /media/movies
mkdir -p /media/tv

Adjust paths for:

  • macOS: /Users/yourname/...

  • Windows: C:\docker\plex\config


Step 2 – Run Plex Container

Recommended image: linuxserver/plex

docker run -d \
--name plex \
--restart unless-stopped \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=America/New_York \
-p 32400:32400 \
-v /docker/plex/config:/config \
-v /media:/media \
linuxserver/plex

What these do:

  • -p 32400:32400 → Plex web + client access

  • /config → Plex database + settings

  • /media → Your movies / TV / music

  • PUID/PGID → File permissions (important on Linux/NAS)


Step 3 – Open Plex and Claim Server

In your browser:

http://<host-ip>:32400/web

Example:

http://192.168.1.50:32400/web

Sign in with your Plex account and claim the server.


Step 4 – Add Libraries

Inside Plex UI:

  • Settings → Libraries → Add Library

  • Point to:

    • /media/movies

    • /media/tv

    • etc.

Plex will begin scanning immediately.


Step 5 – Verify

You should now be able to:

  • Play media locally

  • See the server from other devices on the network

  • Access the Plex web UI reliably

At this point:

Plex is fully functional in Docker.


Important Notes (That Save Headaches)

1. Permissions Matter

If media doesn’t show up:

  • Check ownership of /media

  • PUID and PGID must match the user who owns the files


2. Hardware Transcoding

If you plan to use hardware acceleration (Intel Quick Sync, NVIDIA, Apple VideoToolbox), you will need:

  • Extra device mappings

  • Different flags

This is optional and can be layered later.


3. Remote Access

Remote access works normally with this setup:

  • Port 32400 forwarded on router (if desired)

  • Or Plex Relay

No special config required at this stage.

How to Run Plex Through a VPN When Plex Is Already in Docker

If your Plex server is running in Docker (click here for instructions to installing Plex in Docker), the easiest and most reliable way to route it through a VPN is to attach Plex to a VPN container’s network namespace. This ensures all Plex traffic goes through the VPN tunnel without changing your router, OS routing, or other devices on the network.

Step 1 – Run a VPN Container

We have instructions to installing a VPN in a Docker container here for Windows and here for MacOS


Step 2 – Stop Your Existing Plex Container

docker stop plex
docker rm plex

(We need to recreate it attached to the VPN network.)


Step 3 – Recreate Plex Using the VPN Container’s Network

docker run -d \
--name plex \
--network container:nordvpn \
-v /path/to/config:/config \
-v /path/to/media:/media \
linuxserver/plex

That --network container:nordvpn line is the key.

It means:

Plex uses the VPN container’s network stack.

No separate IP. No routing rules. No leaks.


Step 4 – Test

Open Plex and check:

  • Public IP from inside Plex container:

docker exec -it plex curl ifconfig.me

It should show the VPN IP, not your home IP.

If it does:

Plex is now fully tunneled through the VPN.


Important Notes (That Actually Matter)

1. Remote Access

Plex Remote Access can still work, but:

  • Port forwarding through VPN is provider-dependent

  • Some VPNs block inbound connections

For guaranteed remote access:

  • Use Plex Relay, or

  • Use a VPN provider that supports port forwarding, or

  • Don’t tunnel Plex if remote access is critical


2. Local Network Access

Because Plex is now behind VPN:

  • Local discovery may break

  • Some clients may not auto-find the server

Fix with:

-e PLEX_CLAIM=claim-xxxx

and manual server IP mapping if needed.


3. Performance

All Plex traffic is now:

Encrypted + routed through VPN

So:

  • Expect some throughput loss

  • CPU on the host matters

How to Route All Network Traffic Through a VPN Using Docker on macOS

When installing a VPN directly on your router isn’t possible (which is very common with ISP-provided or locked-down models, instructions here for doing it though), macOS can be used as an intermediate gateway to route all network traffic through a VPN running inside a Docker container. In this setup, the Mac accepts traffic from other devices on the network, forwards it into Docker’s virtual machine, and the VPN container tunnels it out to the internet. This effectively gives you “router-level” VPN behavior without touching the router itself. However, because macOS and Docker both add virtualization layers, it’s more fragile than a true router solution and can be impacted by sleep mode, firewall rules, and OS updates—so it’s best viewed as a functional workaround rather than a permanent infrastructure replacement.

If you’re running Windows there are different instructions for installing a VPN in Docker on Windows + instructions for routing traffic.

MacOS Architecture Reality

So we need:


Requirements

Click if you need a NordVPN service account


Important Note

On macOS, Docker does not run natively on the host network stack — it runs inside a Linux virtual machine. This means traffic must pass through three layers:

Device → macOS → Docker VM → VPN tunnel → Internet

Because of this architecture, macOS is acting as an intermediate gateway, not a true router. This works, but it is more fragile than a dedicated router or Linux gateway and can be affected by sleep mode, firewall rules, and OS updates.

Real-World macOS Gotchas (Very Important)

These are not edge cases — these are guaranteed pain points:

1. Sleep Kills Everything

If the Mac sleeps:

Your whole network loses internet.

You must disable sleep.


2. macOS Updates Can Reset pf

After updates:

pf rules can be wiped or reordered.

You must reapply.


3. Docker Updates Can Change Interfaces

bridge100 can become vmenet0, etc.

Your routing rule breaks.


4. Some Devices Refuse Non-Router Gateways

Smart TVs, consoles, IoT devices may:

  • Refuse to talk

  • Partially work

  • Break multicast

Click if you need a NordVPN service account

Step 1 – Enable IP Forwarding on macOS

sudo sysctl -w net.inet.ip.forwarding=1

To persist:

sudo nano /etc/sysctl.conf

Add:

net.inet.ip.forwarding=1

Load:

sudo sysctl -p

This tells macOS:

“You are allowed to route packets between interfaces.”

Without this, nothing works.


Step 2 – Run NordVPN in Docker

Example:

docker run -d \
--name nordvpn \
--cap-add=NET_ADMIN \
--device /dev/net/tun \
nordvpn/nordvpn

Then:

docker exec -it nordvpn bash
nordvpn login
nordvpn connect

Verify:

ip a

You must see tun0.
If not, stop here — the rest is meaningless.


Step 3 – Identify Docker VM Interface on macOS

Run:

ifconfig

You will usually see one of:

  • bridge100

  • vmenet0

  • vmenet1

This is the interface macOS uses to talk to the Docker VM.

We’ll call it:

DOCKER_IF = bridge100 (example)

Also identify your LAN interface:

en0 = Wi-Fi
en1 = Ethernet

Step 4 – Enable NAT on macOS (pf firewall)

Edit pf config:

sudo nano /etc/pf.conf

Add at the top or in NAT section:

nat on en0 from 192.168.1.0/24 to any -> (en0)

This says:

“Any LAN traffic leaving en0 gets NAT’d”

Then load:

sudo pfctl -f /etc/pf.conf
sudo pfctl -e

Check:

sudo pfctl -s nat

You should see your rule.


Step 5 – Route LAN Traffic Into Docker VM

Now we tell macOS:

“Traffic coming from LAN → send it into Docker VM”

Add this to /etc/pf.conf:

pass in on en0 route-to (bridge100) from 192.168.1.0/24 to any keep state

(Replace bridge100 with your actual Docker interface.)

Reload:

sudo pfctl -f /etc/pf.conf

At this point:
macOS is forwarding + NAT’ing + routing into Docker VM.


Step 6 – Enter Docker VM

On macOS:

docker run -it --privileged --pid=host alpine sh

Or:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

(This drops you into the Linux VM itself.)

Alternatively, easier:

docker exec -it nordvpn bash

and then inspect networking from there.


Step 7 – Enable Forwarding Inside Docker VM

Inside the VM:

sysctl -w net.ipv4.ip_forward=1

Step 8 – NAT Docker VM Traffic Into VPN Tunnel

Inside the VM:

iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

Allow forwarding:

iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

Now the chain is complete:

Device → macOS → Docker VM → tun0 → VPN → Internet

Step 9 – Make macOS the Gateway for Other Devices

This is the same router reality problem as Windows.

Best case (rare):

Router LAN DHCP settings:

Gateway = <macOS IP>

Common case:

Manually set on each device:

IP: 192.168.1.120
Subnet: 255.255.255.0
Gateway: 192.168.1.50 ← macOS machine
DNS: 1.1.1.1

Now that device routes through the Mac.


Step 10 – Test

On the device:

If not:

  • pfctl -sr

  • pfctl -sn

  • iptables -t nat -L

  • netstat -rn on macOS

How to Force All Traffic Through a VPN on Windows Using Docker (When Your Router Can’t)

How to Force All Traffic Through a VPN on Windows Using Docker (When Your Router Can’t)

When your router can’t run a VPN client (which is very common with ISP-provided or locked-down models, instructions here for doing it though), one workaround is to route all network traffic through a Windows machine running a VPN inside a Docker container. In this setup, the Windows PC effectively becomes a gateway: other devices send their traffic to it, Windows forwards it to the Docker virtual machine, and the VPN container tunnels it out to the internet. It’s not as clean or simple as a true router-level VPN, and it comes with real limitations (firewalls, sleep states, Docker networking quirks), but it can achieve “whole-network VPN” behavior when traditional router installs aren’t possible.

If you’re running MacOS there are different instructions for installing a VPN in Docker on MacOS + instructions for routing traffic.

Windows Architecture Reality

So we need:

  1. Windows to forward traffic

  2. Windows to NAT into Docker VM

  3. Docker VM to forward into VPN tunnel (click here for instructions on installing the VPN Docker container on Windows).

Requirements

The Hard Limits

Know this!

  1. If Windows sleeps → internet dies

  2. Docker updates can break networking

  3. WSL2 networking is NAT’d → adds latency

  4. Some devices (Chromecast, consoles) hate non-standard gateways

  5. This is not “set and forget”

Click if you need a NordVPN service account

Step 0 – Verify Docker is Using WSL2

In PowerShell:

wsl -l -v

You should see:

docker-desktop Running 2

If not, fix that first.


Step 1 – Enable IP Forwarding in Windows

Open PowerShell as Administrator:

Get-NetIPInterface

Find your main LAN interface (usually Ethernet or Wi-Fi), note the InterfaceIndex.

Then:

Set-NetIPInterface -InterfaceIndex <index> -Forwarding Enabled

Now enable the routing service:

sc config RemoteAccess start= auto
sc start RemoteAccess

This is important. Without this, Windows often won’t forward packets reliably.


Step 2 – Allow Forwarding Through Windows Firewall

Still in admin PowerShell:

netsh advfirewall firewall add rule name="Allow Forwarded Traffic" dir=in action=allow protocol=any
netsh advfirewall firewall add rule name="Allow Forwarded Traffic" dir=out action=allow protocol=any

Or, more controlled:

Set-NetFirewallProfile -Profile Domain,Public,Private -AllowInboundRules True

(You can tighten later.)


Step 3 – Run NordVPN in Docker

Example:

docker run -d ^
--name nordvpn ^
--cap-add=NET_ADMIN ^
--device /dev/net/tun ^
nordvpn/nordvpn

Then:

docker exec -it nordvpn bash
nordvpn login
nordvpn connect

Verify tunnel:

ip a

You must see tun0. If not, stop.


Step 4 – Enter the Docker VM (WSL2)

In PowerShell:

wsl -d docker-desktop

Now you are inside the Linux VM that actually hosts the container network.


Step 5 – Enable Forwarding in WSL2

sudo sysctl -w net.ipv4.ip_forward=1

Step 6 – NAT WSL2 Traffic Into the VPN Tunnel

Still inside WSL2:

sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

Allow forwarding:

sudo iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
sudo iptables -A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

At this point:

Windows can forward → WSL2 can forward → VPN tunnel exists

The pipeline is now technically functional.


Step 7 – Make Windows the Gateway for Other Devices

This is where router reality kicks in.

Case A – Router Allows DHCP Gateway Override (Rare)

Router LAN settings:

Gateway: <Windows IP>

Done.


Case B – Router Does NOT Allow (Most Common)

You must set per device:

Example on a device:

IP: 192.168.1.100
Subnet: 255.255.255.0
Gateway: 192.168.1.50 ← Windows machine
DNS: 1.1.1.1

Now that device routes:

Device → Windows → WSL2 → NordVPN → Internet

Step 8 – Test

On the device:

If not:

  • Check Windows firewall

  • Check ip route in WSL2

  • Check iptables -t nat -L

Click here if you want to save on NordVPN

NordVPN Docker Container (Windows Edition)

This guide shows you how to run NordVPN in Docker and force other containers to use it for all their internet traffic.

This is the correct method for Windows using Docker Desktop. If you need the MacOS version of this, click here.

If you’re using Windows 10/11 + Docker Desktop (WSL2 backend), the cleanest way to run NordVPN in Docker is to:

  1. Run a VPN gateway container (Gluetun)
  2. Attach other containers to the VPN gateway using network_mode: "service:gluetun"
  3. Publish ports on the VPN container, not the app containers

This keeps your Windows host untouched while forcing selected containers to use the VPN.

Click to download the ZIP of the Docker files

Click For Special NordVPN Deal


Prerequisites (Windows)

  • Docker Desktop installed
  • WSL2 backend enabled in Docker Desktop
    • Docker Desktop → Settings → General → ✅ “Use the WSL 2 based engine”
  • A NordVPN account (username + password)

Note: NordVPN has multiple login methods across apps. For Gluetun, you’ll typically use your NordVPN service credentials (not necessarily the same as your Nord account login in the GUI app). If your regular login fails, check Nord’s dashboard for “service credentials.”

NordVPN Service Credentials

If you’re running NordVPN in Docker (or using OpenVPN/WireGuard manually), you do NOT use your email + password.

You must use Nord’s Service Credentials.

These are separate, special credentials designed specifically for:

  • OpenVPN
  • WireGuard / NordLynx
  • Routers
  • Docker containers
  • Manual setups

Step 1 – Log Into Your Nord Account

Go to:

https://my.nordaccount.com

Log in with your normal Nord email + password.


Step 2 – Go to “Set Up NordVPN Manually”

Once logged in:

  1. Click NordVPN
  2. Click Set up NordVPN manually

You are now on the page that shows Service credentials.


Step 3 – Copy Your Service Username & Password

You will see two fields:

  • Username (looks like random letters/numbers, not your email)
  • Password (random string)

These are your service credentials.

👉 Copy both of them.
👉 These are what Docker / OpenVPN will use.

Do NOT use:

  • your email
  • your Nord website password

They will not work.


Step 4 – Paste Them Into Your .env File

Open the .env file in the starter pack and paste:

OPENVPN_USER=PASTE_SERVICE_USERNAME_HERE
OPENVPN_PASSWORD=PASTE_SERVICE_PASSWORD_HERE

Example:

OPENVPN_USER=ab123456
OPENVPN_PASSWORD=9xY#Lk2Pq!

Save the file.

🛑 DON’T MISS THIS DEAL
Your government, Internet Service Provider, app/addon/IPTV developers, and all websites document and record your online activity through your identifying IP address.
Your Current Identifying IP Address (digital fingerprint): 18.97.14.83
Browse anonymously by using NordVPN
TODAY’S DEAL
SAVE 72% ON NORDVPN + 3 FREE MONTHS
NordVPN backs their service with a 30-day money-back guarantee
Use your account on 10 devices with blazing fast speeds & thousands of servers
CLAIM NORDVPN DISCOUNT


Step 1: Create a project folder

Example:

  • C:\docker\nordvpn-stack\

Inside it, you’ll create:

  • docker-compose.yml

  • (optional) qb\config\ and qb\downloads\ folders if you use the example app


Step 2: Create docker-compose.yml

Here’s a working baseline using Gluetun + qBittorrent (as an example protected app).

version: "3.8"

services:
gluetun:
image: qmcgaw/gluetun:latest
container_name: gluetun
cap_add:
NET_ADMIN
environment:
VPN_SERVICE_PROVIDER=nordvpn
VPN_TYPE=openvpn
OPENVPN_USER=YOUR_NORDVPN_SERVICE_USERNAME
OPENVPN_PASSWORD=YOUR_NORDVPN_SERVICE_PASSWORD
SERVER_COUNTRIES=United States
TZ=America/New_York
ports:
# Expose app ports HERE (because apps share gluetun’s network)
“8080:8080” # qBittorrent Web UI example
restart: unless-stopped

qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
network_mode: “service:gluetun”
environment:
TZ=America/New_York
WEBUI_PORT=8080
volumes:
./qb/config:/config
./qb/downloads:/downloads
depends_on:
gluetun
restart: unless-stopped

What to edit

Replace:

  • OPENVPN_USER=...

  • OPENVPN_PASSWORD=...

Optional:

  • Change SERVER_COUNTRIES to your preferred region (or another country)


Step 3: Start it on Windows

Open PowerShell in the folder where your compose file lives:

docker compose up -d

Then watch the VPN connection logs:

docker logs gluetun -f

You’re looking for output indicating it successfully connected and set routes.


Step 4: Confirm the VPN is actually working

Run:

docker exec -it gluetun sh

Then inside the container:

wget -qO- ifconfig.me

The IP returned should be a VPN IP, not your normal home/office IP.

Because qbittorrent is sharing Gluetun’s network stack, it will use the same public IP.


Step 5: Access your app (example)

Because ports are published on Gluetun, you’ll access qBittorrent at:

  • http://localhost:8080

(or http://<your-pc-ip>:8080 from another device on your LAN)


Step 6: Add more containers behind the VPN

Any container you want routed through NordVPN just needs:

network_mode: "service:gluetun"
depends_on:
- gluetun

And if that container has a UI/API port, publish it on the gluetun service under ports:.


Common gotchas on Windows

  • Do not publish ports on the protected container when using network_mode: "service:gluetun"
    Publish ports on gluetun instead.

  • If Gluetun can’t authenticate, you’re probably using the wrong Nord credentials. Look for Nord “service credentials.”

  • Windows pathing: the ./qb/... volumes are relative to the compose folder, which is easiest on Windows.

NordVPN Linux Commands Reference

Click For NordVPN Deal

1. Install NordVPN (Ubuntu / Debian)

sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)

After install, log out and back in (or run newgrp nordvpn).


2. Log in

Option A – Browser login (recommended)

nordvpn login

→ Opens a URL → log in → copy code → paste back into terminal.

Option B – Service token (best for servers / Docker)

nordvpn login --token YOUR_SERVICE_TOKEN

3. Basic Connect / Disconnect

nordvpn connect
nordvpn disconnect

Connect to a specific country:

nordvpn connect canada
nordvpn connect united_states
nordvpn connect uk

Connect to a specific city:

nordvpn connect "new york"
nordvpn connect toronto

4. Check Status

nordvpn status

5. Enable Kill Switch (important)

nordvpn set killswitch on

Disable:

nordvpn set killswitch off

6. Auto-connect on Boot

nordvpn set autoconnect on

7. Change Protocol (WireGuard / NordLynx)

nordvpn set technology nordlynx

Other options:

nordvpn set technology openvpn
nordvpn set protocol udp
nordvpn set protocol tcp

8. P2P Servers

nordvpn connect p2p

9. Obfuscated Servers (for restrictive networks)

nordvpn set obfuscate on
nordvpn connect

10. Whitelist Local Network (for NAS, Docker, etc.)

This is critical for Synology, Docker, Portainer, etc.

nordvpn whitelist add subnet 192.168.1.0/24

Or a specific port:

nordvpn whitelist add port 8080

11. Logout

nordvpn logout

If You’re Using This for Docker / Routing Other Containers

Since I know you’re running Synology + Portainer stacks, the usual pattern is:

  • Run NordVPN in its own container

  • Attach other containers to that container’s network namespace

Example (conceptual):

network_mode: "service:nordvpn"

If you want, next we can:

  • set up NordVPN as a Docker service

  • and route specific containers through it

  • without breaking local access to your Synology UI, n8n, etc.


Quick sanity test after connect

curl ifconfig.me

or

curl https://ipinfo.io

If the IP is not your ISP → you’re good.

Click For NordVPN Deal

1 2 3 8