fail synchronize time between two local computers - windows

I have two computers connected with an ethernet cable. Computer 1 runs on Windows, computer 2 runs on Ubuntu. The goal is to synchronize the clock of the Ubuntu computer to the Windows computer. I am not interested in having the true time, the time should just be the same on both computers. There is no internet connection available.
I have set-up a NTP server on the Windows pc, following the instructions of https://techlibrary.hpe.com/docs/otlink-wo/How-to-Configure-a-Local-NTP-Server.html.
On the Ubuntu computer, I first try to ping the Windows pc on IP address 192.168.0.2, which is successful.
Then I try ntpdate -qu 192.168.0.2 which gives:
server 192.168.0.2, stratum 0, offset 0.000000, delay 0.00000
30 Mar 10:13:41 ntpdate[3009]: no server suitable for synchronization found
This is the output of w32tm /query /configuration:
[Configuration]
EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 10 (Local)
MaxPollInterval: 15 (Local)
MaxNegPhaseCorrection: 54000 (Local)
MaxPosPhaseCorrection: 54000 (Local)
MaxAllowedPhaseOffset: 1 (Local)
FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 1 (Local)
UpdateInterval: 360000 (Local)
[TimeProviders]
NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 604800 (Local)
Type: NTP (Local)
NtpServer: time.windows.com,0x9 (Local)
NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)
VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
According to services.msc, the w32tm service is started.
How can I solve this problem?

Related

Issue configuring OpenVPN Server and BIND9 DNS server on the same windows 10 machine

I'm trying to setup a DNS server inside a VPN running on my lan with the following requirements:
Computers that connect to the vpn should use the vpn internal dns server instead of the normal one handed out by my lan router.
The vpn server and dns server need to run on the same windows 10 machine.
I can't seem to get it working without breaking DNS.
Here's what I have so far:
I installed OpenVPN GUI to a windows 10 machine and used the following config:
port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\rangus.crt"
key "C:\\Program Files\\EasyRSA-3.0.8\\pki\\private\\rangus.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh.pem"
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
push "dhcp-option DNS 10.8.0.1"
I also installed Bind9 DNS server on the same windows machine with the following config in named.conf.options:
options {
directory "C:\Program Files\ISC BIND 9\zones";
recursion yes;
allow-recursion { any; };
listen-on { 10.8.0.1; };
listen-on-v6 { none; };
version none;
prefetch 10 60;
querylog yes;
dnssec-validation auto;
};
I can connect to the vpn server without issue. I'm also able to query the dns server like so:
dig google.com #10.8.0.1
; <<>> DiG 9.16.24 <<>> google.com #10.8.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14521
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: *** (good)
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 300 IN A 142.251.46.174
;; Query time: 750 msec
;; SERVER: 10.8.0.1#53(10.8.0.1)
;; WHEN: Mon Jun 20 17:49:39 Pacific Daylight Time 2022
;; MSG SIZE rcvd: 83
However Windows is still using my non vpn dns server at 192.168.0.1 as the default dns server.
I've tried manually setting the DNS server to 10.8.0.1 for my ethernet device from Control Panel\Network and Internet\Network Connections. After that I can run dig queries that resolve from the command line without issue. However dns resolution fails for everything else (my web browser, spotify, etc...)
I've found several errors in the bind9 log that look relevant but I'm not sure what to make of them:
20-Jun-2022 17:07:32.815 dispatch: warning: dispatch 000001E2BD9F46C0: open_socket(0.0.0.0#50540) -> permission denied: continuing
20-Jun-2022 17:07:32.868 lame-servers: info: network unreachable resolving 'spclient.wg.spotify.com/A/IN': 2620:4d:4000:6259:7:7:0:1#53

Connect to remote Kubernetes cluster in private LAN from Windows 10

EDIT: I'm going to leave this up but I moved away from Canonical Kubernetes to a microk8 install and everything "just worked." I would not recommend Canonical Kubernetes at this time (early 2019).
Goal:
I want to connect to the Canonical Kubernetes cluster running on Ubuntu 18.04 box (192.168.2.148) on my Windows machine (192.168.2.40). I installed the cluster via conjure-up.
Problem:
running kubectl cluster-info on windows machine gives me:
Unable to connect to the server: dial tcp 10.91.211.64:443: connectex: A connection attempt
failed because the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond.
I have ssh'd to the ubuntu box and copied the ~/.kube/config file to Windows.
~/.kube/config:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: <BIG LONG STRING O STUFF>
server: https://10.91.211.64:443
name: conjure-canonical-kubern-931
contexts:
- context:
cluster: conjure-canonical-kubern-931
user: conjure-canonical-kubern-931
name: conjure-canonical-kubern-931
current-context: conjure-canonical-kubern-931
kind: Config
preferences: {}
users:
- name: conjure-canonical-kubern-931
user:
password: <Smaller String>
username: admin
Background:
I have a spare Ubuntu 18.04 LTS server (192.168.2.148) on my home LAN that I've used conjure-up to install the Canonical Kubernetes Install.
I've successfully installed the cluster and it seems to be working. I can ssh and see kubectl cluster-info and see the Master, Heapster, KubeDNS, Metrics-server, Grafana and InfluxDB all running.
Kubernetes master is running at https://10.91.211.64:443
Heapster is running at https://10.91.211.64:443/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at https://10.91.211.64:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://10.91.211.64:443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
Grafana is running at https://10.91.211.64:443/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
InfluxDB is running at https://10.91.211.64:443/api/v1/namespaces/kube-system/services/monitoring-influxdb:http/proxy
along with juju status looking like everything is up and running:
Model Controller Cloud/Region
Version SLA Timestamp
conjure-canonical-kubern-931 conjure-up-localhost-673 localhost/localhost 2.4.3 unsupported 02:01:00Z
App Version Status Scale Charm Store Rev OS Notes
easyrsa 3.0.1 active 1 easyrsa jujucharms 195 ubuntu
etcd 3.2.10 active 3 etcd jujucharms 378 ubuntu
flannel 0.10.0 active 5 flannel jujucharms 351 ubuntu
kubeapi-load-balancer 1.14.0 active 1 kubeapi-load-balancer jujucharms 525 ubuntu exposed
kubernetes-master 1.13.2 active 2 kubernetes-master jujucharms 542 ubuntu
kubernetes-worker 1.13.2 active 3 kubernetes-worker jujucharms 398 ubuntu exposed
Unit Workload Agent Machine Public address Ports Message
easyrsa/0* active idle 0 10.91.211.138 Certificate Authority connected.
etcd/0 active idle 1 10.91.211.120 2379/tcp Healthy with 3 known peers
etcd/1* active idle 2 10.91.211.205 2379/tcp Healthy with 3 known peers
etcd/2 active idle 3 10.91.211.41 2379/tcp Healthy with 3 known peers
kubeapi-load-balancer/0* active idle 4 10.91.211.64 443/tcp Loadbalancer ready.
kubernetes-master/0 active idle 5 10.91.211.181 6443/tcp Kubernetes master running.
flannel/0* active idle 10.91.211.181 Flannel subnet 10.1.50.1/24
kubernetes-master/1* active idle 6 10.91.211.218 6443/tcp Kubernetes master running.
flannel/1 active idle 10.91.211.218 Flannel subnet 10.1.85.1/24
kubernetes-worker/0* active idle 7 10.91.211.29 80/tcp,443/tcp Kubernetes worker running.
flannel/4 active idle 10.91.211.29 Flannel subnet 10.1.94.1/24
kubernetes-worker/1 active idle 8 10.91.211.70 80/tcp,443/tcp Kubernetes worker running.
flannel/3 active idle 10.91.211.70 Flannel subnet 10.1.46.1/24
kubernetes-worker/2 active idle 9 10.91.211.167 80/tcp,443/tcp Kubernetes worker running.
flannel/2 active idle 10.91.211.167 Flannel subnet 10.1.30.1/24
Entity Meter status Message
model amber user verification pending
Machine State DNS Inst id Series AZ Message
0 started 10.91.211.138 juju-86bdea-0 bionic Running
1 started 10.91.211.120 juju-86bdea-1 bionic Running
2 started 10.91.211.205 juju-86bdea-2 bionic Running
3 started 10.91.211.41 juju-86bdea-3 bionic Running
4 started 10.91.211.64 juju-86bdea-4 bionic Running
5 started 10.91.211.181 juju-86bdea-5 bionic Running
6 started 10.91.211.218 juju-86bdea-6 bionic Running
7 started 10.91.211.29 juju-86bdea-7 bionic Running
8 started 10.91.211.70 juju-86bdea-8 bionic Running
9 started 10.91.211.167 juju-86bdea-9 bionic Running

How to reach the service running in docker container(overlay) externally from different hosts

I have a docker container running on overlay network. My requirement is to reach the service running in this container externally from different hosts. The service is bind to container's internal IP address and doing port bind to host is not a solution in this case.
Actual Scenario:
The service running inside container is spark driver configured with yarn-client. The spark driver binds to container internal IP(10.x.x.x). When spark driver communicates with hadoop yarn running on different cluster, the application master on yarn tries to communicate back to spark driver on the driver’s container internal ip but it can’t connect driver on internal IP for obvious reason.
Please let me know if there is a way to achieve the successful communication from application master(yarn) to spark driver(docker container).
Swarm Version: 1.2.5
docker info:
Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 42
Server Version: swarm/1.2.5
Role: primary
Strategy: spread
Filters: health, port, containerslots, dependency, affinity, constraint
Nodes: 1
ip-172-30-0-175: 172.30.0.175:2375
└ ID: YQ4O:WGSA:TGQL:3U5F:ONL6:YTJ2:TCZJ:UJBN:T5XA:LSGL:BNGA:UGZW
└ Status: Healthy
└ Containers: 3 (2 Running, 0 Paused, 1 Stopped)
└ Reserved CPUs: 0 / 16
└ Reserved Memory: 0 B / 66.06 GiB
└ Labels: kernelversion=3.13.0-91-generic, operatingsystem=Ubuntu 14.04.4 LTS, storagedriver=aufs
└ UpdatedAt: 2016-09-10T05:01:32Z
└ ServerVersion: 1.12.1
Plugins:
Volume:
Network:
Swarm:
NodeID:
Is Manager: false
Node Address:
Security Options:
Kernel Version: 3.13.0-91-generic
Operating System: linux
Architecture: amd64
CPUs: 16
Total Memory: 66.06 GiB
Name: 945b4af662a4
Docker Root Dir:
Debug Mode (client): false
Debug Mode (server): false
Command to run container: I am running it using docker-compose:
zeppelin:
container_name: "${DATARPM_ZEPPELIN_CONTAINER_NAME}"
image: "${DOCKER_REGISTRY}/zeppelin:${DATARPM_ZEPPELIN_TAG}"
network_mode: "${CONTAINER_NETWORK}"
mem_limit: "${DATARPM_ZEPPELIN_MEM_LIMIT}"
env_file: datarpm-etc.env
links:
- "xyz"
- "abc"
environment:
- "VOL1=${VOL1}"
- "constraint:node==${DATARPM_ZEPPELIN_HOST}"
volumes:
- "${VOL1}:${VOL1}:rw"
entrypoint: ["/bin/bash", "-c", '<some command here>']
It seems yarn and spark need to be able to see the each other directly on the network. If you could put them on the same overlay network, everything would be able to communicate directly, if not...
Overlay
It is possible to route data directly into the overlay network on a Docker node via the docker_gwbridge that all overlay containers are connected to but, and it's a big but, that only works if you are on the Docker node where the container is running.
So running 2 containers on a 2 node non swarm mode overlay 10.0.9.0/24 network...
I can ping the local container on demo0 but not the remote on demo1
docker#mhs-demo0:~$ sudo ip ro add 10.0.9.0/24 dev docker_gwbridge
docker#mhs-demo0:~$ ping -c 1 10.0.9.2
PING 10.0.9.2 (10.0.9.2): 56 data bytes
64 bytes from 10.0.9.2: seq=0 ttl=64 time=0.086 ms
docker#mhs-demo0:~$ ping -c 1 10.0.9.3
PING 10.0.9.3 (10.0.9.3): 56 data bytes
^C
--- 10.0.9.3 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
Then on the other host the container are reversed but it's still the local container that is accessable.
docker#mhs-demo1:~$ sudo ip ro add 10.0.9.0/24 dev docker_gwbridge
docker#mhs-demo1:~$ ping 10.0.9.2
PING 10.0.9.2 (10.0.9.2): 56 data bytes
^C
--- 10.0.9.2 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
docker#mhs-demo1:~$ ping 10.0.9.3
PING 10.0.9.3 (10.0.9.3): 56 data bytes
64 bytes from 10.0.9.3: seq=0 ttl=64 time=0.094 ms
64 bytes from 10.0.9.3: seq=1 ttl=64 time=0.068 ms
So the big issue is the network would need to know where containers are running and route packets accordingly. If the network were capable of achieving routing like that, you probably wouldn't need an overlay network in the first place.
Bridge networks
Another possibility is using a plain bridge network on each Docker node with routable IP's. So each bridge has an IP range assigned that your network is aware of and can route to from anywhere.
192.168.9.0/24 10.10.2.0/24
Yarn DockerC
router
10.10.0.0/24 10.10.1.0/24
DockerA DockerB
The would attach a network to each nodes.
DockerA:$ docker network create --subnet 10.10.0.0/24 sparknet
DockerB:$ docker network create --subnet 10.10.1.0/24 sparknet
DockerC:$ docker network create --subnet 192.168.2.0/24 sparknet
Then the router configures routes for 10.10.0.0/24 via DockerA etc.
This is a similar approach to the way Kubernetes does its networking.
Weave Net
Weave is similar to overlay in that it creates a virtual network that transmits data over UDP. It's a bit more of a generalised networking solution though and can integrate with a host network.

cannot ping www.google in a docker container when connected to one wifi

For some strange reason, I am not able to ping www.google.com when connected to one wifi.
If I disconnect from that wifi and connect to another wifi, I am able to ping www.google.com. This has happened on 2 different wifi.
While on those wifi networks, I am able to browse the web and ssh into AWS ec2.
------ On good wifi, my t-mobile hotspot ----
Joshuas-MBP:react-tutorial joshuacalloway$ docker run alpine ping www.google.com
PING www.google.com (216.58.216.68): 56 data bytes
64 bytes from 216.58.216.68: seq=0 ttl=61 time=34.701 ms
----- On 2 different wifi networks, iphone 6 t-mobile hotspot and a company guest wifi network ----
--- www.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 29.912/52.059/91.565 ms
Joshuas-MBP:react-tutorial joshuacalloway$ docker run alpine ping www.google.com
ping: bad address 'www.google.com'
docker -v
Docker version 1.10.3, build 20f81dd
On mac os X 10.11.3
Are you able to ping the IP while switching between WiFi? If you can ping the IP, then I would try one of two solutions:
Edit the /etc/resolv.conf from the host in order to use external DNS (e.g., 8.8.8.8, 8.8.4.4)
Run docker with -dns option, e.g.,
docker run -dns 8.8.8.8 -dns 8.8.4.4 base ping google.com
Or reboot the default virtualbox container:
docker-machine restart default

iperf transfer & bandwidth output is garbage on Windows 7

I'm trying to run an iperf session between Windows-7 64bit laptop, through wireless AP, to iPad running iperf server.
At Windows, I type:
iperf -c 10.31.186.128 -p 5201 -t 1
...and get this output with bad (garbage) transfer and bandwidth:
C:\PRIMARY_INSTALL\iPerf 2.0.5 as of 4-21-2015>iperf -c 10.31.186.128 -p 5201 -t 1
Client connecting to 10.31.186.128, TCP port 5201
TCP window size: 63.0 KByte (default)
[ 3] local 10.31.186.191 port 51730 connected with 10.31.186.128 port 5201
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 64909840858359 bits 6572394324026484130271096932523s/sec
The problem was that those tools were incompatible.
The following solution works...
IPAD IOS7 CLIENT & WINDOWS-7 SERVER:
1. Install to Windows: iPerf v2 command line tool from:
https://iperf.fr/
Enter directory with iperf.exe
Run: iperf –s
..which starts service at port 5001.
Install and run “HE.NET Network Tools..” app onto iPad.
Select: “iPerf2” for client
(iPerf3 is not backward compatible with 2)
Enter IP of laptop.
Data rate shown at both ends.

Resources