Traffic through specified IP

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Patrick1610
Newbie
Newbie
Posts: 6
Joined: February 23rd, 2019, 4:12 pm

Traffic through specified IP

Post by Patrick1610 »

Hi, I have a NAS with multiple LAN ports (one on port 192.168.2.6 and one on 192.168.2.7. 

I want to have the app SABNZBD to only use te 192.168.2.7 connection, so I can let that data go through a VPN. Do I need to change the SABNZBD Host setting for this, or does this only set on what ip I can acces SAB?

Regards, 

Patrick
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Traffic through specified IP

Post by sander »

Within SABnzbd, you cannot specify the source IP address for outgoing NNTP sessions.

As you have a NAS, I think you use Linux. For Linux, at the OS level, you can force an application to use a certain interface. See https://unix.stackexchange.com/a/210992/203116 . So two methods:
LD_PRELOAD with faked bind.so, and
ip namespaces with "ip netns"

Or, if you can do some python programming yourself: a few years ago, it was shown how you can program this into SABnzbd.py itself.
Too much a niche case and too error prone to get it into mainstream SAB.
EDIT: I found the thread ... quite interesting and nice: viewtopic.php?p=96582#p96579
Patrick1610
Newbie
Newbie
Posts: 6
Joined: February 23rd, 2019, 4:12 pm

Re: Traffic through specified IP

Post by Patrick1610 »

Thanks! That thread looks promising! Only question i have before I try that: Sab runs on a Synology NAS. Can I edit that application too? Or is maybe even the first method possible on Synology
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Traffic through specified IP

Post by sander »

Patrick1610 wrote: February 24th, 2019, 3:36 am Thanks! That thread looks promising! Only question i have before I try that: Sab runs on a Synology NAS. Can I edit that application too?
Certainly: on a NAS (which is Linux), SAB also runs from source. But, check question: are you a programmer? And do you know stuff about interfaces and IP addresses?

Patrick1610 wrote: February 24th, 2019, 3:36 am Or is maybe even the first method possible on Synology
The first method needs compiling, which looks more difficult on a NAS.
Patrick1610
Newbie
Newbie
Posts: 6
Joined: February 23rd, 2019, 4:12 pm

Re: Traffic through specified IP

Post by Patrick1610 »

I am not a programmer. I think I am okay with using terminal (on MacOS and Ubuntu), but never did anything with my Synology.. My knowledge about IP addresses and networks is also pretty good.

It seems quite scary to me to edit the SAB application on my NAS.. I was hoping for some easier method ;)
Since it runs from source, would the workaround break on an update?
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: Traffic through specified IP

Post by sander »

OK. It's python, so be careful about indentations.

Yes, it will break, ie it will get overwritten.

EDIT:

You use Ubuntu? Better to test on that ... easier to repair / reinstall.
Post Reply