You are not logged in.

#1 2022-07-15 08:21:13

steveoriol
Member
Registered: 2021-08-20
Posts: 1

How can I set an alternate gateway for specific IPs?

How can I set a second gateway when I need to connect to specific IPs?
I set my default gateway to "192.168.2.1 dev enp3s0", and it works fine,
but I need to use "192.168.1.1 dev enp3s0" (which has a fixed public IP) for some secure target IPs (ssh connections).

I try:

sudo ip route add 5.39.xx.xxx via 192.168.1.1       
Error: Nexthop has invalid gateway.

Does anybody know how to proceed?

Offline

Board footer

Powered by FluxBB