iptables and LAN access.

Currently reading
iptables and LAN access.

245
47
NAS
DS918+, DS414j
Operating system
  1. Linux
  2. Windows
  3. other
Mobile operating system
  1. Android
So, after finding two commands which allowed my containers to correctly discern my client's IP addresses:
Code:
https://www.pedrolamas.com/2020/11/04/exposing-the-client-ips-to-docker-containers-on-synology-nas/
sudo iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
sudo iptables -t nat -A PREROUTING -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER
This then breaks my LAN access to a couple of containers which use a VPN to access the network/internet - VPN compose snip:
Code:
  privoxy:
    image: binhex/arch-privoxyvpn:latest
    container_name: privoxy
    cap_add:
      - NET_ADMIN
    ports:
      - 8118:8118
      - 9118:9118
      - 9117:9117 #jackett
      - 9080:9080 #qbittorrent
    volumes:
      - "${SSD}privoxy:/config"
      - '/etc/localtime:/etc/localtime:ro'
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=${NEWVPNUSER}
      - VPN_PASS=${NEWVPNPASS}
      - VPN_PROV=custom
      - VPN_CLIENT=openvpn
      - LAN_NETWORK=192.168.0.0/24
      - SOCKS_USER=${ITSME}
      - SOCKS_PASS=${MYCOMPASS}
      - ENABLE_SOCKS=yes
      - ENABLE_PRIVOXY=yes
      - TZ=${TZ}
    networks:
      - synology
    restart: always

I have a container on the docker "synology" network which has firefox inside and I can access jackett and qbittorrent from that, however I cannot access them from my desktop.
After rebooting the NAS I can no longer discern my client IP addresses but can once again access those two containers so I know it's something to do with the command.
Does anyone have any ideas what's going wrong?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

That sounds weird. Is there any port isolation feature on the LAN ports? If you have a network switch...
Replies
5
Views
875
  • Question
It sounds that the main focus is a LAN reconfiguration of DHCP and DNS services so that dynamically...
Replies
1
Views
572
Had simelar issue last Thursday. Router and 1 NAS worked, 2 NAS’s didn’t! This occurred as I was adding...
Replies
5
Views
858
  • Question
I guess "my Firewall" is the firewall on the Synology? a step by step tutorial can be found online like...
Replies
1
Views
847
OK at last, worked it out, you have to install Synology app on PC first then add name amd password then...
Replies
12
Views
1,347

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top