E
E
Evgeny Petryaev2019-07-22 12:26:56
Computer networks
Evgeny Petryaev, 2019-07-22 12:26:56

How to get from network 192.168.1.0 to 192.168.0.3?

Here is a diagram 5d358e3bb9082276381561.jpegmarked with a pencil, but I'm not completely sure

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Petryaev, 2019-07-23
@Gremlin92

In general, the problem was solved like this: From the beginning I made a network -> Enterprise network, and then turned off the Windows firewall and ping went
, also added such rules and it all worked

sudo iptables -A FORWARD -i enp3s1 -o enp3s0 -p tcp --syn --dport 3306 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -i enp3s1 -o enp3s0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A FORWARD -i enp3s0 -o enp3s1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -A PREROUTING -i enp3s1 -p tcp --dport 3306 -j DNAT --to-destination 192.168.0.3
sudo iptables -t nat -A POSTROUTING -o enp3s0 -p tcp --dport 3306 -d 192.168.0.3 -j SNAT --to-source 192.168.1.2

J
Jhon Do, 2019-07-22
@Spellman30

To begin with, clarify the points in which you are not sure, ping, for example. The specified ip addresses are in the same subnet, and if there is a sitting, there should be no problems. And what do you mean by "get in"? Remote control? File transfer?

D
DDwrt100, 2019-07-22
@DDwrt100

What can be seen from the diagram.
You have two segments, the server with the address 192,168,0,2 is the point of intersection of the specified networks.
It should have two interfaces, 192,168,0,2 towards the network (192,168,0,3) and one more ip address should be on the second interface on the network 192,168,1,0.
The network address 192,168,1,0 will be the default gateway or gateway(to enter network 192,168,0,3) for segment 192,168,1,0.
Actually, as the traffic reaches the server 192,168,0,2, the server must act as a router, and you are already on the network 192,168,0,3
UPD: I looked more closely at the diagram. You need an intersection point or other gateway. If the switch with the address 0.254 has L3 functions, then you can raise the interface on the network 1.0 there. or otherwise you need a device that can route.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question