Link to home
Start Free TrialLog in
Avatar of AnimatorThree
AnimatorThree

asked on

Easy one - how do I tell linux 7.3 to direct traffic for a specufuc IP to my router?

Dumb question, how do I use something like route add in the Windows world to route traffic for a specific IP to another IP.

I want to route stuff for 10.1.2.20 to 192.168.1.1

I used:

route add host 10.1.2.20 gw 192.168.1.1

but i got the message RTNETLINK answers: Network is unreachable

I can ping 192.168.1.1 though.

Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

0;.0.0.0 change for  your ips
example

route add 10.1.2.20 mask 255.255.255.255 192.168.1.1
im sorry i miss understand your question   sorry


check this link you have a solution in here

https://www.experts-exchange.com/questions/21195972/How-do-you-add-a-route-to-Linux.html
ASKER CERTIFIED SOLUTION
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial