S
S
Sergey Vasiliev2021-08-22 19:14:51
iptables
Sergey Vasiliev, 2021-08-22 19:14:51

How to correctly redirect traffic through the tunnel?

Hello, I want to say right away that I am a beginner in my field and do not understand much that may seem elementary for smart people, if not difficult, please describe everything in more detail.

Hello, I have servers that are located in the pterodactyl control panel. It works through docker.
The system is designed in such a way that there is a panel, a main server and a filtering server; in the idea, traffic should go through the filtering server and get to the main one. Now it all works through the gre tunnel by simply forwarding ports from the filtering server to the main one. But if the user makes a request (for example, http) from the main server, then he will immediately go to the site, bypassing the tunnel, which adds a vulnerability.
There is also a second vulnerability. In docker, I have to use the host interface, which allows users to use ports that are not intended for them.
When trying to change the host interface to the local tunnel address (10.200.1.2), the local tunnel address on the filter (10.200.1.3), or the address of the filter itself, it gives the following error on startup:

Error Event [a5a5ea6d-f609-46f7-b5f4-437e121a5363]: environment/docker: failed to start container: Error response from daemon: driver failed programming external connectivity on endpoint 61339f33-ab06-403b-9ea9-88f21c7e15b6 (240dac4ae1a06d1b5841a81910c8214497e34c022883398e4d7ef50a78d4dc77): Error starting userland proxy: listen tcp4 172.19.121.59:25565: bind: cannot assign requested address

(the local address is now testing everything on virtual machines on my computer, but the essence is the same)

As I understand it, in order to solve the problems, I need to redirect all traffic from the main machine to the tunnel, I tried to do this, but it didn’t work out, so I ask for help . Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question