S
S
saxer2015-10-05 11:06:47
CentOS
saxer, 2015-10-05 11:06:47

How to merge point to point networks in centos?

Let's say there is a server with centos 6 and a white ip address. There are 2 PCs with gray ip addresses. You need to make sure that 2 PCs (or more) establish a connection with the server and can see each other.
I installed pptpd on the server and configured it like this:
cat /etc/ppp/options.pptpd
logwtmp
localip 192.168.20.1,192.168.30.1
remoteip 192.168.20.234-240,192.168.30.234-240
Connecting fine from both PCs:
ppp0 Link encap: Point-to-Point Protocol
inet addr:192.168.30.1 PtP:192.168.30.235 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:492 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:46102 (45.0 KiB) TX bytes:4110 (4.0 KiB)
ppp1 Link encap:Point-to-Point Protocol
inet addr :192.168.20.1 PtP:192.168.20.235 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:41127 errors:0 dropped:0 overruns:0 frame:0
TX packets:21780 errors:0 dropped: 0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:55094650 (52.5 MiB) TX bytes:931795 (909.9 KiB) The
question is how can I make the server forward packets automatically from ppp0 to ppp1 and vice versa.
Initially, I configured pptpd like this:
cat /etc/ppp/options.pptpd
logwtmp
localip 192.168.20.1
remoteip 192.168.20.234-240
Both connections had a common gateway 192.168.20.1 iperf on the first PC showed huge speeds and on the second PC did not show any connections at all (although pings between the nodes went but periodically disappeared).
Google gives a bunch of links about OpenVPN but in my case I do not need encryption and security is not so important to me, I could not find a single example where an intermediate server was used only to connect networks without providing users with access to the Internet. I suspect that it is necessary to correctly register ip route, but how to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2015-10-05
@martin74ua

localip is the same for all connections. It doesn't matter at all ;)
Is ipv4_forward enabled on the server?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question