Answer the question
In order to leave comments, you need to log in
How to organize the transfer of traffic through another interface?
I study routing in Linux.
[email protected]:~$ ifconfig
enp0s25 Link encap:Ethernet HWaddr b4:99:ba:57:d2:42
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:20 Memory:d4700000-d4720000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:215 errors:0 dropped:0 overruns:0 frame:0
TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:17353 (17.3 KB) TX bytes:17353 (17.3 KB)
wlp36s0b1 Link encap:Ethernet HWaddr 20:10:7a:01:9d:1a
inet addr:192.168.0.32 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c5e9:633f:a3ff:f6b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105 errors:0 dropped:0 overruns:0 frame:0
TX packets:151 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61603 (61.6 KB) TX bytes:31603 (31.6 KB)
[email protected]:~$ sudo ifconfig enp0s25 10.170.0.1 up
[email protected]:~$ sudo route add 10.170.10.1 gw 192.168.0.1
[email protected]:~$ sudo route del default
[email protected]:~$ sudo route add default gw 10.170.10.1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question