A
A
Alek_D2021-04-15 16:02:09
iptables
Alek_D, 2021-04-15 16:02:09

How to set up an additional gateway on the same subnet Centos 7 or Ubuntu?

Good afternoon. Help deal with the issue. Initial data: there is a network with a gateway 192.168.0.1. Through it, machines in the local network go to the Internet. Due to the limited number of available Internet connections on the 192.168.0.1 gateway, it is required to raise a gateway within this subnet, which will have to act as a gateway for a certain group of computers. T . e. The scheme should be as follows: internet <--> gateway(192.168.0.1) <--> gateway(192.168.0.2(new gateway)) <--> client. The question is how to set up a gateway on Centos 7 or Ubuntu on the same interface and on the same subnet. In those instructions that I found, they write that you need to uncomment net.ipv4.ip_forward=1 in the /etc/sysctl.conf file and everything will work. However, it doesn't work. Are there any other recommendations to make it a gateway.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-04-15
@q2digger

that is, you want to "hide" some of the computers on the 192.168.0.0/24 network behind a second "internal" gateway?
then you need to mask them at the exit from this gateway - do SNAT or MASQUERADE on outgoing traffic. So that the main gate thinks that it is the second intermediate gateway that goes through it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question