LipiLee / ToyShark

Packet Analyzer for Android
Apache License 2.0
74 stars 35 forks source link

DNS packets not being received by client #6

Closed taylorj91 closed 5 years ago

taylorj91 commented 5 years ago

Hello, I really appreciate the effort you put forth to maintain this wonderful project. I've been playing with it and trying to test it out with my own DNS server, and I've noticed the client doesn't seem to receive the DNS responses when DNS traffic goes through the vpn.

I'm very inexperienced, but would you mind providing any recommendations to solving this? I'm currently just adding the following line to ToySharkVPNService.java line 380 in the method startVpnService( ):

Builder builder = new Builder() .addAddress("10.120.0.1", 32) .addRoute("0.0.0.0", 0) .addDnsServer("8.8.8.8") // added this line .setSession("ToyShark");

Have you successfully been able to allow DNS traffic through the VPN and still forward packets to and from the client?

taylorj91 commented 5 years ago

@LipiLee any suggestions on this?

LipiLee commented 5 years ago

@taylorj91 Thanks for your report and sorry that response is so late because of Chuseok(Korean Thanksgiving) and debugging it. UDP packets has been dropped in kernel's network stack due to the invalid checksum in its IP header. I have already fixed this issue. So you can check it after pull.

taylorj91 commented 5 years ago

Thank you so much for this fix! Works great now!