Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWG routing not using default routing rules #54

Open
zvbyy opened this issue Oct 24, 2024 · 0 comments
Open

AWG routing not using default routing rules #54

zvbyy opened this issue Oct 24, 2024 · 0 comments

Comments

@zvbyy
Copy link

zvbyy commented Oct 24, 2024

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.

@zvbyy zvbyy changed the title AWG Routing Not Using Default Route AWG routing not using default route Oct 24, 2024
@zvbyy zvbyy changed the title AWG routing not using default route AWG routing not using default routing rules Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant