Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


WireGuard IPv4 Routing HELP
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WireGuard IPv4 Routing HELP

ZreindZreind Member
edited November 2023 in Help

Hi!

I'm trying to learn wireguard. And need some help, i'm a beginner at networking.

Server A:

[Interface]
Address = 192.168.1.1/24
ListenPort = 51820
PrivateKey = key

[Peer]
PublicKey = key
AllowedIPs = 192.168.1.2/32, AdditionalIP/32
Endpoint = ServerB:51820

Server B:

[Interface]
Address = 192.168.1.2/24, AdditionalIP/32
ListenPort = 51820
PrivateKey = key

[Peer]
PublicKey = key
AllowedIPs = 192.168.1.1/32
Endpoint = ServerA:51820

I want to use the AdditionalIP/32 which belongs to Server A on Server B

I can ping both 192.168.1.x from servers, also AdditionalIP.
However, I cant access to ServerB with AdditionalIP.

root@ServerA:~# ip ro show dev wg0
AdditionalIP scope link
192.168.1.0/24 proto kernel scope link src 192.168.1.1

root@ServerB:
3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none
    inet 192.168.1.2/24 scope global wg0
       valid_lft forever preferred_lft forever
    inet AdditionalIP/32 scope global wg0
       valid_lft forever preferred_lft forever

When ping AdditionalIP from outside.
Request timed out.
Reply from 10.0.1.174: Destination host unreachable.
Request timed out.

Comments

  • @Zreind said: I want to use the AdditionalIP/32 which belongs to Server A on Server B

    To use AdditionalIP on Server B it needs to be routed to Server A. If AdditionallIP isn't routed to Server A but instead is supposed to be assigned to the external interface, then proxy-ARP is needed.

    Thanked by 1Zreind
  • ZreindZreind Member
    edited November 2023

    @lebuser said:

    @Zreind said: I want to use the AdditionalIP/32 which belongs to Server A on Server B

    To use AdditionalIP on Server B it needs to be routed to Server A. If AdditionallIP isn't routed to Server A but instead is supposed to be assigned to the external interface, then proxy-ARP is needed.

    It is not routed to Server A. Also I have tried proxy-arp but still not working.

    ~~Reply from 10.0.1.174: Destination host unreachable.~~
    

    It gone. And only shows:
    Request timed out.

    Tracert has changed and ServerA is the next hop after 10.0.1.174:

      12     6 ms     7 ms     6 ms  10.0.1.174
      13     6 ms     7 ms     7 ms  ServerA
      14     *        *        *     Request timed out.
      15     *        *        *     Request timed out.
    
  • yoursunnyyoursunny Member, IPv6 Advocate

    Not WireGuard, but I made moving IPv4 via IP6GRE tunnel.
    https://yoursunny.com/t/2023/borrow-ipv4/

    Thanked by 3ehab Zreind waheed
  • @yoursunny said:
    Not WireGuard, but I made moving IPv4 via IP6GRE tunnel.
    https://yoursunny.com/t/2023/borrow-ipv4/

    Gre protocol is blocked and can’t be used. Also i want to do that with wg.

    Thanked by 1BasToTheMax
Sign In or Register to comment.