A
A
aefimovru2019-08-02 11:09:11
Windows
aefimovru, 2019-08-02 11:09:11

Is forwarding in 2 directions possible?

The situation is as follows: There is a server connected to the domain. You need to connect from it via the Cisco AnyConnect Secure Mobility Client to the service provider to upload data. When we connect - this VPN network becomes more "priority". DNS already takes them, not ours. All network settings are lost when reconnecting.
I'm thinking of making a separate machine for this connection and making it a gateway. How can I do a full data redirect. That is, if the data goes from computer A to this computer, they all flowed to computer B. And vice versa. It's possible at all, isn't it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem @Jump, 2019-08-02
curated by the

Is forwarding in 2 directions possible?
Yes.
this VPN network becomes more "priority". DNS already takes them, not ours
Well, this problem is solved without any redirects at all.
When you connect a VPN - the gateway in the VPN network becomes the default gateway, and all traffic for which the route is not registered goes there.
To prevent this from happening, forbid the VPN to set it as the default gateway when connecting (how to do this depends on the type of connection). In this case, all traffic will go as it did.
And in order to get to the desired server in the VPN network, you will need to register a route to it.
As a result, all traffic will go through the main connection, and traffic to your server will go through the VPN.
I'm thinking of making a separate machine for this connection and making it a type of gateway.
Well, the car is too fat, an inexpensive router like Mikrotik is enough.
Forwarding is done by writing three rules for iptables. Banal NAT and port forwarding.
But you still have to configure the traffic routing to the server that will be redirected, so you get a more complex system - it's easier to set up routing right away. Redirection is completely redundant here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question