vpn – Routing all web site visitors of a wireguard consumer by way of one other wireguard consumer

0
4
vpn – Routing all web site visitors of a wireguard consumer by way of one other wireguard consumer


Drawback Assertion:

I’ve two homes (House1 and House2) linked through a WireGuard VPN setup, with routers performing as intermediaries. I have to configure the community so that each one internet-bound site visitors from a laptop computer in House2 routes by way of House1’s web connection (particularly RouterA’s public IP).

Present Community Setup:

  • House1:
    • RouterA is linked to the ISP and offers web entry.
    • LAN_A (linked to RouterA) comprises native units that may be accessed from the House2 laptop computer.
    • RouterB is linked to RouterA and runs the WireGuard consumer, connecting to the WireGuard server in House2.
    • RouterB offers entry to LAN_B (linked to RouterB) and permits the House2 laptop computer to entry each LAN_A and LAN_B.
  • House2:
    • Brume2 acts because the WireGuard server.
    • The House2 laptop computer connects to Brume2 by way of the WireGuard consumer and may entry LAN_A (RouterA’s LAN) and LAN_B (RouterB’s LAN).

Aim:

I wish to route all internet-bound site visitors from the House2 laptop computer by way of House1’s web connection (through RouterA) in order that the laptop computer’s web site visitors seems as if it’s coming from House1’s public IP (i.e., RouterA’s public IP).

At the moment, the House2 laptop computer can entry each LAN_A and LAN_B, however its web site visitors isn’t routed by way of House1. I would like to regulate the configuration so that each one site visitors from the House2 laptop computer makes use of RouterA’s public IP for web entry whereas sustaining entry to LAN_A and LAN_B.


Community Diagram:

                              +-------------------+
                              |   Laptop computer in House2 |
                              |   (WireGuard Shopper)|
                              +----------+--------+
                                         |
                                         | WireGuard Tunnel (House2 to House1)
                                         |
                    +--------------------+--------------------+
                    |                                        |
         +----------v----------+                      +------v-------+
         |   Brume2 (House2)   |                      |   RouterB    |
         | (WireGuard Server)   |                      | (WireGuard   |
         |                      |<-------------------->|   Shopper)    |
         +----------+-----------+                      | (Linked to |
                    |                                  |   RouterA)   |
                    |                                  +--------+------+
         +----------v-----------+                               |
         | LAN_B (RouterB's LAN)|                               |
         | (Gadgets in House1)  |                               |
         +----------------------+                               |
                    |                                          |
            +-------v--------+                        +--------v---------+
            |   RouterA      |                        |  Web (House1)|
            | (Linked to  |                        | (House1's ISP)    |
            |    ISP)        |                        +-------------------+
            +--------+-------+
                     |
                     | Entry to LAN_A (Gadgets in House1)
            +--------v--------+
            | LAN_A (RouterA's|
            | Native Community)  |
            | (Gadgets in     |
            | House1)         |
            +-----------------+

Abstract:

  • RouterA offers each web entry and LAN_A (native community in House1).
  • RouterB is working the WireGuard consumer and is linked to RouterA, offering entry to each LAN_A and LAN_B (native community in House2).
  • The House2 laptop computer can entry each LAN_A and LAN_B by way of the WireGuard VPN.
  • The target is to route all web site visitors from the House2 laptop computer by way of House1’s web connection, making it seem as if the web site visitors is coming from House1’s public IP.

What I examined to date:-

If set a static route in Brume2 for IPV4 to as follows
goal:192.168.33.0/24 gateway 10.0.12.52 (wireguard consumer IP house1)
goal: 192.168.44.0/24 gateway 10.0.12.52 (wireguard consumer IP house1)

If I do the above in brume2 which is working wireguard server in house2 I’m able to attain each LAN-A and LAN-B as in diagram

If I set the route on the House2 Brume2 WireGuard server as follows, with the general public IP addresses of www.whatismyipadress.com (104.19.222.79 and 104.19.223.79), that are the general public IPs for that web site, then the scenario modifications. Once I configure this on the House2 Brume2 WireGuard server, and if I exploit a laptop computer in House2 (with WireGuard consumer working), after I kind www.whatismyipadress.com in Chrome, it exhibits the House1 public IP as a substitute of the House2 public IP. This makes me imagine that the House1 router is aware of how one can resolve web addresses.

Now, what I need assistance with is instructing the Brume2 WireGuard server at House2 to route all site visitors from the WireGuard laptop computer consumer (with IP 10.0.12.32) to 10.0.12.52 (the House1 WireGuard consumer IP) because the gateway. Basically, I need the Brume2 server to deal with any site visitors originating solely from the laptop computer consumer and route it to the House1 WireGuard consumer working on the router (exit node for laptop computer in house2).

LEAVE A REPLY

Please enter your comment!
Please enter your name here