Problematic system

whether until now there is no way to enjoy wireguard normally, the wireguard problem when the lights go out or the router reboots the wireguard cannot be reconnected if the wireguard is not connected again the internet cannot be accessed. I tried almost all the methods in this forum and in other forums until now it didn't work, I had to sync the time in the browser so that the wireguard can get back in touch. I hope the development team will see my moan in order to find a solution so that the guards can be enjoyed like openvpn without control stay connected

1 Like
  • Just pick a NTP server that can be accessed outside of the tunnel

Let's troubleshoot this, first.

(Moved to Installing and Using OpenWrt - Network and Wireless Configuration)

2 Likes

thank you for your response. can you give me an example

  • Just pick a NTP server that can be accessed outside of the tunnel
user@machine:~$ nslookup 1.north-america.pool.ntp.org
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	1.north-america.pool.ntp.org
Address: 98.191.213.7
Name:	1.north-america.pool.ntp.org
Address: 195.21.137.209
Name:	1.north-america.pool.ntp.org
Address: 50.205.244.107
Name:	1.north-america.pool.ntp.org
Address: 72.38.129.202

Let's use 72.38.129.202:

#in /etc/config/network

config route                          
	option interface 'wan'
	option target '72.38.129.202'
	option netmask '255.255.255.255'
	option gateway '192.168.1.x'

Be sure to add the IP to your time System settings!

1 Like

thank you I will try and tell the results

For reliability I'd recommend setting up 4 NTP servers this way. If you use one, and it goes down, then you can't get back up. With 4 it's unlikely they'll all be down at once.

Another option is to set up one of your LAN machines as an NTP server. particularly one like a desktop or media PC that has an RTC clock. Then you can get time from your local network without needing the WAN.

Another option is to use the firewall to tag all UDP packets on the NTP port with a firewall mark... then use a route rule to select a separate routing table for routing those packets... this will work with all NTP servers on the internet.

3 Likes

You can also use a one shot sync bound to interface

ntpd -n -q -N -I wan -p 0.uk.pool.ntp.org -p 1.uk.pool.ntp.org

5 Likes

Ooh, I like that even better, because you can easily set it up in /etc/rc.local and it doesn't require any monkey business with routing or firewall.

1 Like

Thank you. where should I store this on my ?

Thank you.
is this what you mean? I need to save this in /etc/rc.local
ntpd -n -q -N -I wan -p 0.uk.pool.ntp.org -p 1.uk.pool.ntp.org

There would be no name resolution without an Up tunnel (if the OP's DNS servers are up the tunnel too). Use IP addresses.

:thinking:

The OP said:

Also be sure to use a NTP server that advises using its IP is OK.

Will this not work if I try on my router?

ntpd -n -q -N -I wan -p 203.114.225.252 -p 203.114.224.31

yes using the IPs should work. However you probably need to replace the word "wan" with the OS interface name like eth1 or eth0.2 or something... also I'd add 2 or 3 more ip addresses.

i am using wwan interfaces is this correct?

ntpd -n -q -N -I wwan -p 162.159.200.123 -p 203.114.74.17

do i have to wear this?


ntpd -n -q -N -I wlan0 -p 162.159.200.123 -p 203.114.74.17

Perhaps you can run it manually with debug and see what you get first. Replace eth9 with your interface

root@repeater:~# ntpd -d -n -q -N -I eth9 -p 162.159.200.123 -p 203.114.74.17
ntpd: sending query to 203.114.74.17
ntpd: sending query to 162.159.200.123
ntpd: reply from 162.159.200.123: offset:-0.007698 delay:0.009258 status:0x24 strat:3 refid:0x0a1508fb rootdelay:0.011612 reach:0x01
ntpd: reply from 203.114.74.17: offset:+0.057861 delay:0.261745 status:0x24 strat:2 refid:0xdfffb902 rootdelay:0.049363 reach:0x01
ntpd: sending query to 203.114.74.17
ntpd: sending query to 162.159.200.123
ntpd: reply from 162.159.200.123: offset:-0.007763 delay:0.008862 status:0x24 strat:3 refid:0x0a1508fb rootdelay:0.011597 reach:0x03
root@repeater:~#

I followed your direction I opened Putty following this command but there was no response in Putty

ntpd -d -n -q -N -I eth9 -p 162.159.200.123 -p 203.114.74.17

You need to replace eth9 with your interface
ntpd -d -n -q -N -I wlan0 -p 162.159.200.123 -p 203.114.74.17

I have tried to replace it with wlan0 but there was no response in my putty using openwrt 19.07.1

Do you get a response from

ping -I wlan0 8.8.8.8

No respon ping -I wlan0 8.8.8.8