[GH-ISSUE #54] AWG routing not using default routing rules #27

Open
opened 2026-10-13 21:02:30 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @zvbyy on GitHub (Oct 24, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-go/issues/54

Hello.
AWG ignores routing tables and forcefully uses the default route with highest priority.
Situation Description:

Physical interface with internet access: IP 20.20.20.23, gateway 20.20.20.1
IPsec tunnel: IP 10.100.2.1, gateway 10.100.2.2

Adding routing rules to use 10.100.2.2 as the main gateway while keeping 20.20.20.23 functional:

ip route add default via 20.20.20.1 dev ens3 table 101
ip route add 20.20.20.0/24 dev ens3 src 20.20.20.23 table 101
ip rule add from 20.20.20.23 table 101

ip route add default via 10.100.2.2 dev vti1 table 102
ip rule add from 10.100.2.1 table 102
route add default gw 10.100.2.2 metric 1
route del default gw 20.20.20.1

Result: AWG responds through 10.100.2.1
tcpdump output:

04:50:38.096808 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 17
04:50:38.096808 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 42
04:50:38.104765 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 230
04:50:38.105437 ens3 Out IP 10.100.2.1.47987 > client_ext_ip.28213: UDP, length 193

All other software functions correctly. Pure WireGuard works correctly as well.

Originally created by @zvbyy on GitHub (Oct 24, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-go/issues/54 Hello. AWG ignores routing tables and forcefully uses the default route with highest priority. Situation Description: Physical interface with internet access: IP 20.20.20.23, gateway 20.20.20.1 IPsec tunnel: IP 10.100.2.1, gateway 10.100.2.2 Adding routing rules to use 10.100.2.2 as the main gateway while keeping 20.20.20.23 functional: >ip route add default via 20.20.20.1 dev ens3 table 101 ip route add 20.20.20.0/24 dev ens3 src 20.20.20.23 table 101 ip rule add from 20.20.20.23 table 101 >ip route add default via 10.100.2.2 dev vti1 table 102 ip rule add from 10.100.2.1 table 102 route add default gw 10.100.2.2 metric 1 route del default gw 20.20.20.1 Result: AWG responds through 10.100.2.1 tcpdump output: >04:50:38.096808 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 17 04:50:38.096808 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 42 04:50:38.104765 ens3 In IP client_ext_ip.28213 > 20.20.20.23.47987: UDP, length 230 04:50:38.105437 ens3 Out IP 10.100.2.1.47987 > client_ext_ip.28213: UDP, length 193 All other software functions correctly. Pure WireGuard works correctly as well.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-go#27
No description provided.