Answer the question
In order to leave comments, you need to log in
How to switch two networks with the same addressing?
Good afternoon!
There are two networks (LAN1, LAN2) with the same addressing, let's say 10.0.0.0/24. There is a COMP1 computer with two interfaces, looking respectively in LAN1 (10.0.0.10) and LAN2 (10.0.0.20). There is another computer COMP2(10.0.0.30) on LAN2.
Access to COMP2(10.0.0.30) is required from LAN1. Can this be done using iptables on COMP1?
ps Let's not discuss how it's all wrong done. There is a problem and it needs to be solved. There are no network devices. Just what's in the description
Answer the question
In order to leave comments, you need to log in
You can fence off namespaces. Well, NAT of course. Those. no one from the first network will access 10.0.0.30, but let's say 192.168.0.30.
It’s dreary to fence and you need to read a lot before that, but it’s real.
Nail /24 subnet, dividing it into non-intersecting ones and configure routing on the computer in the middle.
Or vice versa, bridge interfaces - then you get one broadcast domain. But again - you need to properly configure the computer "in the middle".
Both options are implemented purely on Linux and iptables/nftables.
The answer to the problem is "There is another computer COMP2(10.0.0.30) in LAN2.
Access to COMP2(10.0.0.30) is required from LAN1"
1. Assign additional addresses from another subnet to all computers from LAN1 that need to go to COMP2 .
2. Assign COMP2 an additional ip from the third subnet.
3. Provide routing or NAT between LAN1 and COMP2.
4. Use for access to COMP2 - additional ip.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question