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

Solved! It were a couple of switches in the LAN, I reset them and everything turned fine!
Replies
1
Views
775
  • Question
I basically have the same setup (QNAP unmanaged switch). Only difference is MTU is set to 1500 on all...
Replies
6
Views
1,319
  • Question
I don't see a reason to use https, if you're accessing your NAS from within your local network. That...
Replies
4
Views
5,342
Try the cabling at 10 GbE and see if it works or not. Either borrow enough gear to test or buy the...
Replies
12
Views
2,072
  • Question
Hm thanks. I use Mac OS X not Windows, but irrespective of whether I can figure out the equivalent step on...
Replies
11
Views
3,955
I have the same rule for vpn, this allows the vpn subnet to access the local lan subnet, which is where...
Replies
27
Views
3,522

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