B
B
bigazzzz2020-10-15 18:34:33
Computer networks
bigazzzz, 2020-10-15 18:34:33

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

4 answer(s)
O
Oleg Volkov, 2020-10-15
@voleg4u

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.

K
ky0, 2020-10-15
@ky0

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.

A
Alexey Dmitriev, 2020-10-16
@SignFinder

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.

R
Rsa97, 2020-10-16
@Rsa97

It won't work through iptables.
If the networks do not have computers with the same IP, then you can raise a bridge (bridge) between the LAN1 and LAN2 interfaces. In this case, COMP1 will work as a switch to which both networks are connected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question