Is there a way to relay veth in docker to remote host by tunnel?

Viewed 37

I do not want the docker to access my host LAN or internet directly by NAT.

Is it possible to provide a tcp or udp tunnel to relay the veth in docker to the remote proxy? So that the docker can not access my local network resource and can use the remote host to access internet (just like a proxy).

                    +-------------------+
                    |  lan 10.1.2.3/24  |       +-------------+
            +------>+-------tunnel- ----|<----->+ remote host |
            |       +-------------------+       +-------------+
            |                         
    +-------+-------+       
    |  veth01-peer  |       
    +-------+-------+       
            |                 
+-----------+------------+ 
|  |      veth01      |  |
|  |   192.168.1.100  |  |
|  +------------------+  |
|         docker         | 
+------------------------+ 
0 Answers
Related