Change source of packet in a multihomed machine
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I got one server. this server has two interfaces named enp30s0 and enp31s0.
enp30s0 is connected to a modem to internet with the IP address 10.66.64.130
enp31s0 is connected to a huge Lan with lots and lots of subnetworks like 10.66.0.1 10.66.1.1 10.66.2.1 and so on, with the IP address 192.168.0.106.
I got a second route table to add the gateway of enp31s0 so other subnetworks can see me.
###RUTE TABLE###
post-up ip route add 10.66.64.0/24 dev enp31s0 src 10.66.64.130 table rt2
post-up ip route add default via 10.66.64.254 dev enp31s0 table rt2
post-up ip rule add from 10.66.64.130/32 table rt2
post-up ip rule add to 10.66.64.130/32 table rt2
Everything works but if from the server I do something like a
ping 10.66.0.165
the server goes through the enp30s0 and not through enp31s0.
1?: [LOCALHOST] pmtu 1500
1: 192.168.0.1 3.226ms
1: 192.168.0.1 0.489ms
2: 192.168.1.254 1.538ms
3: 192.168.1.254 1.343ms pmtu 1492
I need that the address from the server to 10...* goes through enp31s0.
How can i achieve that?
networking route interface gateway ip-address
 |Â
show 1 more comment
up vote
0
down vote
favorite
I got one server. this server has two interfaces named enp30s0 and enp31s0.
enp30s0 is connected to a modem to internet with the IP address 10.66.64.130
enp31s0 is connected to a huge Lan with lots and lots of subnetworks like 10.66.0.1 10.66.1.1 10.66.2.1 and so on, with the IP address 192.168.0.106.
I got a second route table to add the gateway of enp31s0 so other subnetworks can see me.
###RUTE TABLE###
post-up ip route add 10.66.64.0/24 dev enp31s0 src 10.66.64.130 table rt2
post-up ip route add default via 10.66.64.254 dev enp31s0 table rt2
post-up ip rule add from 10.66.64.130/32 table rt2
post-up ip rule add to 10.66.64.130/32 table rt2
Everything works but if from the server I do something like a
ping 10.66.0.165
the server goes through the enp30s0 and not through enp31s0.
1?: [LOCALHOST] pmtu 1500
1: 192.168.0.1 3.226ms
1: 192.168.0.1 0.489ms
2: 192.168.1.254 1.538ms
3: 192.168.1.254 1.343ms pmtu 1492
I need that the address from the server to 10...* goes through enp31s0.
How can i achieve that?
networking route interface gateway ip-address
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
1
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I got one server. this server has two interfaces named enp30s0 and enp31s0.
enp30s0 is connected to a modem to internet with the IP address 10.66.64.130
enp31s0 is connected to a huge Lan with lots and lots of subnetworks like 10.66.0.1 10.66.1.1 10.66.2.1 and so on, with the IP address 192.168.0.106.
I got a second route table to add the gateway of enp31s0 so other subnetworks can see me.
###RUTE TABLE###
post-up ip route add 10.66.64.0/24 dev enp31s0 src 10.66.64.130 table rt2
post-up ip route add default via 10.66.64.254 dev enp31s0 table rt2
post-up ip rule add from 10.66.64.130/32 table rt2
post-up ip rule add to 10.66.64.130/32 table rt2
Everything works but if from the server I do something like a
ping 10.66.0.165
the server goes through the enp30s0 and not through enp31s0.
1?: [LOCALHOST] pmtu 1500
1: 192.168.0.1 3.226ms
1: 192.168.0.1 0.489ms
2: 192.168.1.254 1.538ms
3: 192.168.1.254 1.343ms pmtu 1492
I need that the address from the server to 10...* goes through enp31s0.
How can i achieve that?
networking route interface gateway ip-address
I got one server. this server has two interfaces named enp30s0 and enp31s0.
enp30s0 is connected to a modem to internet with the IP address 10.66.64.130
enp31s0 is connected to a huge Lan with lots and lots of subnetworks like 10.66.0.1 10.66.1.1 10.66.2.1 and so on, with the IP address 192.168.0.106.
I got a second route table to add the gateway of enp31s0 so other subnetworks can see me.
###RUTE TABLE###
post-up ip route add 10.66.64.0/24 dev enp31s0 src 10.66.64.130 table rt2
post-up ip route add default via 10.66.64.254 dev enp31s0 table rt2
post-up ip rule add from 10.66.64.130/32 table rt2
post-up ip rule add to 10.66.64.130/32 table rt2
Everything works but if from the server I do something like a
ping 10.66.0.165
the server goes through the enp30s0 and not through enp31s0.
1?: [LOCALHOST] pmtu 1500
1: 192.168.0.1 3.226ms
1: 192.168.0.1 0.489ms
2: 192.168.1.254 1.538ms
3: 192.168.1.254 1.343ms pmtu 1492
I need that the address from the server to 10...* goes through enp31s0.
How can i achieve that?
networking route interface gateway ip-address
networking route interface gateway ip-address
edited Aug 7 at 23:40
Rui F Ribeiro
36.5k1271116
36.5k1271116
asked Aug 7 at 22:29
skyark
11
11
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
1
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00
 |Â
show 1 more comment
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
1
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
1
1
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00
 |Â
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461176%2fchange-source-of-packet-in-a-multihomed-machine%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please invest some time on writing your questions.
â Rui F Ribeiro
Aug 7 at 23:42
I know this is a duplicate....not finding it.
â Rui F Ribeiro
Aug 7 at 23:44
Thanks for your time. First question and not familiar with the site.
â skyark
Aug 8 at 0:44
@RuiFRibeiro - I think dirkt wrote this up - unix.stackexchange.com/questions/457270/â¦.
â slmâ¦
Aug 8 at 3:19
1
@slm There is something else, but that might do, depending on situation. I have not yet though well about the question, and today wont be probably a day for it.
â Rui F Ribeiro
Aug 8 at 6:00