Salamek / huawei-lte-api

API For huawei LAN/WAN LTE Modems
GNU Lesser General Public License v3.0
376 stars 92 forks source link

Disabling IPv6 #176

Closed tvkamara closed 1 year ago

tvkamara commented 1 year ago

Hi, thanks for the great project. Do you know if there exists a way to disable IPv6 ? I can see 'ipv6_enabled': '1' in global/module-switch, but does there exist a way to modify this?

My problem is that no matter what APN I give (even IPv4 only), the router advertises an IPv6 DNS (its own IP). This leads to lancache not working (which only supports IPv4).

So I'm looking for a way to completely disable IPv6 or a working way to modify the IPv6 DNS addresses. I have the H112-370 router. On my older Huawei router, adding an IPv4 APN did the trick but on the current 5G router it always advertises the IPv6 DNS.

Salamek commented 1 year ago

You should be able to create your own dialup profile with ip_type = IpType.IPv4 usinghttps://github.com/Salamek/huawei-lte-api/blob/8c8b269e36c8f63d7fdb7343e1848c5ddc3cdf64/huawei_lte_api/api/DialUp.py#L55

If that does not work, you may just disable IPv6 on clients or use some IPv4 only router (old router that can't do IPv6 or new router that allows disabling IPv6 - all should allow that) connected in your modem and setting modem to bridge mode letting the IPv4 router do the routing/DHCP etc...

Salamek commented 1 year ago

No response for long time, i consider this answered, closing...