The_Dave Posted September 27, 2019 #1 Posted September 27, 2019 Hi, I've recently built a NAS on xpenology basis (918+ on 6.2.2) and have added a second lan port so that I can use one lan port for the system fuctions including port forwarding and one port to use with jdownloader through a vpn on my router. My question is now, how I can configure jdownloader to use only the lan port that's routed trough the vpn. Any help would be really appreciated. Quote
jensmander Posted September 27, 2019 #2 Posted September 27, 2019 Do you have different routers and subnets or a router with multiple subnets and gateways? AFAIK you can not "nail" an application in DSM to a specific gateway. The firewall control is only related to incoming traffic, not outgoing. Static route function is - as it's name says - for routing traffic into other subnets. You could define the gateway on the second interface and remove it from the first one. But this will send all outgoing (internet) traffic from your NAS through your VPN. If you use only one subnet for both NICs you still can NAT from your firewall to the first NIC (which has no gateway). Another scenario is the use of multiple gateways where you can define the "weight". If the option for multiple gateways is enabled you can define which GW should be used first. But in the end it's the same as described above (setting the GW only on second NIC). Quote
The_Dave Posted September 27, 2019 Author #3 Posted September 27, 2019 Both lan ports go through the same router, but one lan port is set to vpn bypass, so that I can use port forwarding and ddns, because that doen`t work through vpn. If it helps, I use dd-wrt on my router with the flashrouters script for the vpn. I`m really a noop in terms of network configuration, because I never needed to know anything about it before I bought the NAS and the router. I never thought that it could be so difficult to use a vpn connection while being able to access the NAS remotely via ddns. Quote
jensmander Posted September 27, 2019 #4 Posted September 27, 2019 So all of your internet traffic is routed through the VPN? If you want the VPN only on your NAS you can create a VPN profile in DSM for your provider and set it as default gateway. The second thing is enabling DDNS on your router, not the NAS. So if you connect from the outside your router will handle the NAT and DDNS updates are updated correctly. If you enable DDNS on a device which uses VPN your DSL/cable IP will not be reachable from the outside since DDNS will point to your VPN IP. Quote
The_Dave Posted September 27, 2019 Author #5 Posted September 27, 2019 I want all my devices to be protected by the vpn, that's why I configured the vpn on my router. I can exclude single ips from the vpn though. If set the NAS to vpn passthrough I can set up the ddns on the NAS and the port forwarding works, but then my jdownloader is also not protected. That's why I bought a second nic that uses the vpn and is only meant for the jdownloader. Quote
flyride Posted September 28, 2019 #6 Posted September 28, 2019 Running some of these services on docker may help, as it is possible to bind docker apps to specific networks. Quote
jensmander Posted September 28, 2019 #7 Posted September 28, 2019 You could try a „dirty“ workaround. Connect the second Nic (static ip or dhcp) and open jdownloader. In the advanced settings search for „custom proxy list“ and enter this (code between the ***, I‘m on mobile and the quote function is a pain): *** [ { "proxy" : { "address" : "eth1", "type" : "DIRECT" }, "rangeRequestsSupported" : true, "enabled" : true }, { "proxy" : { "type" : "NONE" }, "rangeRequestsSupported" : true, "filter" : { "type" : "WHITELIST", "entries" : [ ".*?jdownloader.org", ".*?appwork.org" ] }, "reconnectSupported" : true, "enabled" : true } ] *** eth1 in line 3 is your second Nic. Quote
The_Dave Posted September 28, 2019 Author #8 Posted September 28, 2019 (edited) Thanks for your help. So I replace eth1 with the ip adress of my second nic? Is there any possibility to check if the jdownloader uses the right nic? For example can I check the public ip? Edited September 28, 2019 by The_Dave Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.