endlessh-go
endlessh-go copied to clipboard
NixOS: "Failed to obtain geohash. Lookup ip-api.com on [::1]:53 connection refused"
The systemd service is not able to resolve the geohash API host. Oddly it's pointing to localhost to try and resolve it. resolveconf.service
is enabled and active. There are valid nameservers in /etc/resolv.conf
. I can dig ip-api.com
just fine. Here's the systemd status for endlessh-go:
● endlessh-go.service - SSH tarpit
Loaded: loaded (/etc/systemd/system/endlessh-go.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-05-02 15:22:11 UTC; 54min ago
Main PID: 271204 (endlessh-go)
IP: 170.9K in, 533.3K out
IO: 6.3M read, 0B written
Tasks: 5 (limit: 1152)
Memory: 11.4M
CPU: 884ms
CGroup: /system.slice/endlessh-go.service
└─271204 /nix/store/i4kqp7h5n5j2avwj6gjjjihhg6axxxqz-endlessh-go-20230625-3/bin/endlessh-go -logtostderr -host=x.x.x.x -port=22 -enable_prometheus -prometheus_host=x.x.x.x -prometheus_port=2112 -geoip_supplier=ip-api
May 02 16:06:01 nixos endlessh-go[271204]: W0502 16:06:01.326615 271204 client.go:60] Failed to obatin the geohash of 218.92.0.97: Get "http://ip-api.com/json/218.92.0.97": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:34947->[::1]:53: read: connection refused.
May 02 16:11:30 nixos endlessh-go[271204]: W0502 16:11:30.645957 271204 client.go:60] Failed to obatin the geohash of 180.101.88.196: Get "http://ip-api.com/json/180.101.88.196": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:34406->[::1]:53: read: connection refused.
May 02 16:11:57 nixos endlessh-go[271204]: W0502 16:11:57.753493 271204 client.go:60] Failed to obatin the geohash of 218.92.0.96: Get "http://ip-api.com/json/218.92.0.96": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:53675->[::1]:53: read: connection refused.
May 02 16:12:19 nixos endlessh-go[271204]: W0502 16:12:19.649602 271204 client.go:60] Failed to obatin the geohash of 218.92.0.113: Get "http://ip-api.com/json/218.92.0.113": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:50887->[::1]:53: read: connection refused.
May 02 16:12:50 nixos endlessh-go[271204]: W0502 16:12:50.385315 271204 client.go:60] Failed to obatin the geohash of 94.203.171.157: Get "http://ip-api.com/json/94.203.171.157": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:46093->[::1]:53: read: connection refused.
May 02 16:13:07 nixos endlessh-go[271204]: W0502 16:13:07.635677 271204 client.go:60] Failed to obatin the geohash of 183.129.208.82: Get "http://ip-api.com/json/183.129.208.82": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:47188->[::1]:53: read: connection refused.
May 02 16:13:12 nixos endlessh-go[271204]: W0502 16:13:12.766532 271204 client.go:60] Failed to obatin the geohash of 121.135.254.129: Get "http://ip-api.com/json/121.135.254.129": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:39893->[::1]:53: read: connection refused.
May 02 16:13:22 nixos endlessh-go[271204]: W0502 16:13:22.202812 271204 client.go:60] Failed to obatin the geohash of 218.92.0.96: Get "http://ip-api.com/json/218.92.0.96": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:41506->[::1]:53: read: connection refused.
May 02 16:14:44 nixos endlessh-go[271204]: W0502 16:14:44.648870 271204 client.go:60] Failed to obatin the geohash of 218.92.0.96: Get "http://ip-api.com/json/218.92.0.96": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:45123->[::1]:53: read: connection refused.
May 02 16:16:06 nixos endlessh-go[271204]: W0502 16:16:06.965790 271204 client.go:60] Failed to obatin the geohash of 218.92.0.96: Get "http://ip-api.com/json/218.92.0.96": dial tcp: lookup ip-api.com on [::1]:53: read udp [::1]:45047->[::1]:53: read: connection refused.
Running on NixOS 23.11. Relevant config:
services.endlessh-go = {
enable = true;
listenAddress = "<PUBLIC IP>";
port = 22;
prometheus = {
enable = true;
listenAddress = "<VPN IP>";
};
extraOptions = [
"-geoip_supplier=ip-api"
];
};