Binding Rclone To Second NIC

Arch Linux, Kernel 4.2x IIRC

Can you run rclone in one terminal window and in another run netstat -tuanp | grep rclone and see if rclone is binding the outgoing addresses to the local correct IP?

I just got to work, and apparently my public IP changed so I can’t shell in :-/ gonna have to wait until tonight

rclone tried to do a DNS lookup of "enp7s0” and got 2 items back is what it is complaining about! A strange error I agree

I’m running unbound and nsd on the same server and have it’s IP in /etc/resolv.conf along with 192.168.1.1, which just forwards to 8.8.8.8, but nsd is borked apparently because it keeps on telling me there’s a syntax error in the first line when there isn’t. I also have a public facing DNS server on dns.he.net…but in neither of them are there any A records for enp7s0…which just makes this even more confusing.

No probs!

Yes I have not a lot of idea what happened there! rclone doesn’t take an interface name in the bind field though so we can not go there if we want :wink:

It is indeed binding to the correct IP, this just keeps getting more and more odd hahaha

[bran@server ~]$ sudo netstat -tuanp|grep rclone
 
tcp        0      1 192.168.2.7:57631       172.217.12.205:443      SYN_SENT    13714/rclone  

Oh, I see what is going on.

Even though it is bound to the correct IP, because the destination isn’t within the netmask of the LAN it is being routed out of the default route and hence via the other interface.

I think you’ll need to do some fancy routing like the link @Animosity022 posted above.

What things do work? Using ping with an interface name does some special stuff which isn’t available to programs not running as root. Did you get anything other than ping running on it - if so how?

Ah interesting! I’m not an expert with networking, I usually just stick to the basics of one interface and then bridge it if I need multiple things using it.

What things do work? Using ping with an interface name does some special stuff which isn’t available to programs not running as root. Did you get anything other than ping running on it - if so how?

By that I was referring to ping and curl, but I have also had VMs bind to the interface directly whenever I need to spin something up and test it, but I’ve always kept it within the same subnet, just a different IP.

I guess I’ll have to figure out how to adapt that to systemd-networkd, thanks for the help everyone!

The goal would be to use iproute2 and configure another gateway for that interface.

Something like this ‘should’ work with a little playing around.

https://www.thomas-krenn.com/en/wiki/Two_Default_Gateways_on_One_System#More_than_Two_Network_Cards_or_Gateways

You can configure those routes and such with a simple systemd startup as I found that to be easier than trying to muck around with Network Manager.

Awesome, thanks, I’ll give it a try either tonight or this weekend.

And it works perfectly once I added in the new routing table! :smiley:

Thanks again, my friends that access my plex server will be happy now hahaha

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.