Answer the question
In order to leave comments, you need to log in
How to organize direct access between two interfaces?
Firework!
There is a CentOS 7 server with three network cards:
wan - 11.11.11.11
lan0 - 172.16.0.1/24
lan1 - 172.16.1.1/24
net.ipv4.ip_forward = 1
FirewallD manages everything
external (active)
interfaces: wan
sources:
services: http https ssh
ports: ...
masquerade: yes
forward-ports:...
icmp-blocks: timestamp-reply timestamp-request
rich rules
internal (default, active)
interfaces: lan0 lan1
sources:
services: dhcpv6-client http https ipp-client mdns mountd nfs rpc-bind samba-client ssh
ports:
masquerade: no
forward-ports:
icmp-blocks: timestamp-reply timestamp-request
rich rules:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 11.11.11.22 0.0.0.0 UG 100 0 0 wan
11.11.11.11 0.0.0.0 255.255.255.248 U 100 0 0 wan
172.16.0.0 0.0.0.0 255.255.252.0 U 0 0 0 lan0
172.16.1.0 0.0.0.0 255.255.255.0 U 0 0 0 lan1
Answer the question
In order to leave comments, you need to log in
try adding
ip ra 172.16.0.0/24 dev lan0 src 172.16.0.1
ip ra 172.16.1.0/24 dev lan1 src 172.16.1.1
and check just in case that
cat /proc/sys/net/ipv4/ip_forward
will return 1
Gentlemen, everything turned out to be much more prosaic. It turned out that my "provider" has a private network 172.16.0.0/24, and therefore there were conflicts of ip addresses, which I did not notice due to deep inattention. After changing the subnet everything worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question