N
N
nowaycantstay2018-01-11 11:43:54
linux
nowaycantstay, 2018-01-11 11:43:54

How to disable forwarding between two interfaces on the same machine?

two virtual interfaces tun0 (with a vpn server) and tun2 (vpn client) are raised on ubuntu, while the client should not connect to the server on this system, but should connect to the server with the same configuration on another machine. Probably, it is necessary to prohibit forwarding between interfaces, but how exactly - I have no idea. Help, please.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
H
HighMan, 2018-01-11
@HighMan

openvpn --config /etc/openvpn/client.ovpn

S
Sergey, 2018-01-11
@feanor7

Set up iptables.
INPUT + FORWARD allow connections from tun0 to tun2, + deny rules to eth0

K
krosh, 2018-01-11
@krosh

Denying traffic from one interface to another:
If you need to prohibit the client from going to another vpn server:
Or just disable forwarding on the server:
sysctl -w net.ipv4.ip_forward=0or in /etc/sysctl.conf

I
Ingvar, 2018-01-11
@take

and to dissolve vpn under subnets? the server, for example, 10.0.0.1 is this server, and where the client climbs 10.0. 1.1 ? or I misunderstood something? )

I
iilin, 2018-01-12
@iilin

The client will reconnect to the nearest server if they have the same address (DNS) with the remote server. Do you have the correct connection IP specified in the config and is it not the same?
Spread configs we will treat.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question