How do I bind s3 gateway to specific interface?

My server has multiple interfaces. How can I launch the S3 gateway and be bound to a specific interface/ip? I don’t see anything in the --help sections.

Hey @utdrmac, can you specify what it is you are trying to do exactly?

I think he has more than one network card and also more than one network like 192.168.0.0/24 and second like with 10.10.1.0/24 and he want to start gateway on second ip.

Yea, exactly what @Vadim said. Was I not clear on that?

My default interface/route is out my VPN, which I think is responsible for my atrocious upload speeds to the network. I’d like to be able to bind the s3 gateway, and uplink_linux_amd64 to a different interface which will bypass the VPN and use local network.

Unfortunately the binding of S3 gateway will not change the routing for outgoing traffic.

It should be done on OS level, you should create a route table to route only needed traffic to the VPN, specifying the remote address with subnet to route to the VPN and make a default route to the NIC with internet for other traffic.

I disagree. Anything that I bind to en6sp (192.168.10.0/24) routes out that interface’s default gateway, which is not VPN’d. Anything that binds to the default interface, en5sp (10.1.1.0/24), goes out my VPN. I have many other services running on this box which are bound specifically to en6sp and none of them route out over the VPN. Thus, if the gateway was capable of being bound to a specific interface, then it would route non-VPN just like my other services.

ok, seems you already have a needed routes in your route table.
You can change the binding address (and port) in the server.address: option of the config.yaml.
Save the change and restart a gateway.

1 Like