Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On a redhat 7 system we want to be able to choose the source interface for outgoing traffic based on which interface the traffic came in. We tried using ip rule and ip route. Even the most simple rule like this does not work (tcp only shows incoming SYN packets).
This is the config:
ip rule
0: from all lookup local
32761: from all iif eth0 lookup outgoing
32766: from all lookup main
32767: from all lookup default
ip route show table outgoing
default via 10.82.191.33 dev eth0
For incoming packets from a certain host, let's say 168.63.129.16, in only see incoming SYN packets. I get the impression that the ip rule is not triggered or working. Difficult to debug!
Help (please) ! Help?
The available interfaces;
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0d:3a:38:fc:c2 brd ff:ff:ff:ff:ff:ff
inet 10.82.191.37/28 brd 10.82.191.47 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20d:3aff:fe38:fcc2/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0d:3a:aa:61:07 brd ff:ff:ff:ff:ff:ff
inet 10.82.191.4/27 brd 10.82.191.31 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet 10.82.191.7/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:2
valid_lft forever preferred_lft forever
inet 10.82.191.5/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:0
valid_lft forever preferred_lft forever
inet 10.82.191.6/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:1
valid_lft forever preferred_lft forever
inet6 fe80::20d:3aff:feaa:6107/64 scope link
valid_lft forever preferred_lft forever
On a redhat 7 system we want to be able to choose the source interface for outgoing traffic based on which interface the traffic came in. We tried using ip rule and ip route. Even the most simple rule like this does not work (tcp only shows incoming SYN packets).
This is the config:
ip rule
0: from all lookup local
32761: from all iif eth0 lookup outgoing
32766: from all lookup main
32767: from all lookup default
ip route show table outgoing
default via 10.82.191.33 dev eth0
For incoming packets from a certain host, let's say 168.63.129.16, in only see incoming SYN packets. I get the impression that the ip rule is not triggered or working. Difficult to debug! Help (please) ! Help? The available interfaces;
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0d:3a:38:fc:c2 brd ff:ff:ff:ff:ff:ff
inet 10.82.191.37/28 brd 10.82.191.47 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20d:3aff:fe38:fcc2/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0d:3a:aa:61:07 brd ff:ff:ff:ff:ff:ff
inet 10.82.191.4/27 brd 10.82.191.31 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet 10.82.191.7/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:2
valid_lft forever preferred_lft forever
inet 10.82.191.5/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:0
valid_lft forever preferred_lft forever
inet 10.82.191.6/27 brd 10.82.191.31 scope global secondary noprefixroute eth1:1
valid_lft forever preferred_lft forever
inet6 fe80::20d:3aff:feaa:6107/64 scope link
valid_lft forever preferred_lft forever
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.