Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andriod relay support #107

Closed
dongdongbh opened this issue Feb 21, 2023 · 1 comment
Closed

Andriod relay support #107

dongdongbh opened this issue Feb 21, 2023 · 1 comment

Comments

@dongdongbh
Copy link

dongdongbh commented Feb 21, 2023

I have similar problem as #84, I have a server which has public ip as lighthouse with ip 192.168.100.1, I set up a computer client with ip 192.168.100.2, which works fine. Then I setup a client on Andriod. When I started connection, it gets ip 192.168.100.3 from lighthouse. I can ping Andriod device 192.168.100.3 on lighthouse server, but I can not ping the Andriod device the client computer. There is one active lighthouse tunel on Android. When I use a ping tool to ping 192.168.100.1 on Android, it also works fine. But I can't ping 192.168.100.2 on my phone.

I changed listen.host on lighthouse and client computer to "[::]" didn't make any difference.

I follow announcing-relay-support-in-nebula to setup relay, I enabled relay on lighthouse, but I can not modify the config file on Andriod to add

relay:
  relays:
    - 192.168.100.1

to make relay work.

The config on Android

pki:
  ca: |
    -----BEGIN NEBULA CERTIFICATE-----
    
    xxxxxxx
    -----END NEBULA CERTIFICATE-----
  cert: |
    -----BEGIN NEBULA CERTIFICATE-----
    xxxxxxxx
    -----END NEBULA CERTIFICATE-----
  key: <hidden>
  blacklist: []
static_host_map:
  192.168.100.1:
  - xx.xx.xx.xx:4242
lighthouse:
  am_lighthouse: false
  serve_dns: false
  dns:
    host: ""
    port: 0
  interval: 60
  hosts:
  - 192.168.100.1
listen:
  host: 0.0.0.0
  port: 4242
  batch: 64
  read_buffer: 0
  write_buffer: 0
punchy:
  punch: true
  respond: false
  delay: 1s
cipher: aes
local_range: ""
sshd:
  enabled: false
  listen: ""
  host_key: ""
  authorized_users: []
tun:
  dev: tun1
  drop_local_broadcast: true
  drop_multicast: true
  tx_queue: 500
  mtu: 1300
  routes: []
  unsafe_routes: []
logging:
  level: debug
  format: text
stats:
  type: ""
  interval: ""
  prefix: ""
  protocol: ""
  host: ""
  listen: ""
  path: ""
  namespace: ""
  subsystem: ""
handshakes:
  try_interval: 100ms
  retries: 20
  wait_rotation: 5
firewall:
  conntrack:
    tcp_timeout: 120h
    udp_timeout: 3m
    default_timeout: 10m
    max_connections: 100000
  outbound:
  - port: any
    proto: any
    host: any
  inbound: []
relays:
  use_relays: true

The log on Android

time="2023-02-21T14:33:41Z" level=debug msg="Trusted CA fingerprints" fingerprints="[d6a13a67660aa291d1755a1e3f2962739eb2d7cef57157796fafe0d833b1224d]"
time="2023-02-21T14:33:41Z" level=debug msg="Client nebula certificate" cert="NebulaCertificate {\n\tDetails {\n\t\tName: oneplus\n\t\tIps: [\n\t\t\t192.168.100.3/24\n\t\t]\n\t\tSubnets: []\n\t\tGroups: [\n\t\t\t\"phone\"\n\t\t]\n\t\tNot before: 2023-02-21 07:31:29 +0000 UTC\n\t\tNot After: 2024-02-21 07:05:34 +0000 UTC\n\t\tIs CA: false\n\t\tIssuer: d6a13a67660aa291d1755a1e3f2962739eb2d7cef57157796fafe0d833b1224d\n\t\tPublic key: a51d17c2de96921d792a1e361cc1ca7d9b8a9b3a12b3cd0919b0739ee0337d59\n\t}\n\tFingerprint: 753fd90887a55734e4a301b25e2c2211ef9d3f05e899f4351ad54a208980e025\n\tSignature: 07db374378564a972d7299444475461fac22e68a49a5402cee15105be0b6c4c1c53a9e4501820d27453d607a812c5e62bda0f625bb0495231fd488f5fd83150d\n}"
time="2023-02-21T14:33:41Z" level=info msg="Firewall rule added" firewallRule="map[caName: caSha: direction:outgoing endPort:0 groups:[] host:any ip: proto:0 startPort:0]"
time="2023-02-21T14:33:41Z" level=info msg="Firewall started" firewallHash=b6eef9a546df4160c507a1c6409465df04ecf536f4338191121437632002f187
time="2023-02-21T14:33:41Z" level=info msg="Main HostMap created" network=192.168.100.3/24 preferredRanges="[]"
time="2023-02-21T14:33:41Z" level=info msg="UDP hole punching enabled"
time="2023-02-21T14:33:41Z" level=info msg="Loaded send_recv_error config" sendRecvError=always
time="2023-02-21T14:33:41Z" level=debug msg="Generated index" index=3546594933
time="2023-02-21T14:33:41Z" level=debug msg="Packet store" length=1 stored=true vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=3546594933 udpAddrs="[xx.xx.xx.xx:4242]" vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=info msg="Nebula interface is active" build= interface=android network=192.168.100.3/24 udpAddr="[::]:4242"
time="2023-02-21T14:33:41Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 36 0 1 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 22 58 0 5 2 0 0 1 0 143 0 193 75 0 0 0 1 4 0 0 0 255 2 0 0 0 0 0 0 0 0 0 1 255 7 154 13]"
time="2023-02-21T14:33:41Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 8 58 255 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 133 0 103 142 0 0 0 0]"
time="2023-02-21T14:33:41Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 36 0 1 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 22 58 0 5 2 0 0 1 0 143 0 193 75 0 0 0 1 4 0 0 0 255 2 0 0 0 0 0 0 0 0 0 1 255 7 154 13]"
time="2023-02-21T14:33:41Z" level=debug msg="Rebinding UDP listener and updating lighthouses due to network change"
time="2023-02-21T14:33:41Z" level=debug msg="Packet store" length=2 stored=true vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=debug msg="Rebinding UDP listener and updating lighthouses due to network change"
time="2023-02-21T14:33:41Z" level=debug msg="Packet store" length=3 stored=true vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=info msg="Handshake message received" certName=lighthouse1 durationNs=103041979 fingerprint=b9d8de050bdf3134c27f7b667d13ca6566b2febdca529f3065eb980a22789d38 handshake="map[stage:2 style:ix_psk0]" initiatorIndex=3546594933 issuer=d6a13a67660aa291d1755a1e3f2962739eb2d7cef57157796fafe0d833b1224d remoteIndex=3546594933 responderIndex=3641311362 sentCachedPackets=3 udpAddr="xx.xx.xx.xx:4242" vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=debug msg="Hostmap vpnIp added" hostMap="map[hostinfo:map[existing:true hostId:192.168.100.1 localIndexId:3546594933] mapName:main mapTotalSize:1 vpnIp:192.168.100.1]"
time="2023-02-21T14:33:41Z" level=debug msg="Hostmap hostInfo deleted" hostMap="map[indexNumber:3546594933 mapName:pending mapTotalSize:0 remoteIndexNumber:3641311362 vpnIp:192.168.100.1]"
time="2023-02-21T14:33:41Z" level=debug msg="Sending 3 stored packets" certName=lighthouse1 vpnIp=192.168.100.1
time="2023-02-21T14:33:41Z" level=debug msg="Lighthouse update triggered for punch due to rebind counter" vpnIp=192.168.100.1
time="2023-02-21T14:33:42Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 36 0 1 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 22 58 0 5 2 0 0 1 0 143 0 193 75 0 0 0 1 4 0 0 0 255 2 0 0 0 0 0 0 0 0 0 1 255 7 154 13]"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 36 0 1 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 22 58 0 5 2 0 0 1 0 143 0 193 75 0 0 0 1 4 0 0 0 255 2 0 0 0 0 0 0 0 0 0 1 255 7 154 13]"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:42Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:43Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:44Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:44Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:44Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:45Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:45Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:45Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:45Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 8 58 255 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 133 0 103 142 0 0 0 0]"
time="2023-02-21T14:33:46Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:46Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:46Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:47Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:47Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:47Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:48Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:48Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:48Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:49Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:33:49Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:49Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:33:49Z" level=debug msg="Tunnel status" tunnelCheck="map[method:passive state:alive]" vpnIp=192.168.100.1
time="2023-02-21T14:33:52Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 8 58 255 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 133 0 103 142 0 0 0 0]"
time="2023-02-21T14:34:04Z" level=debug msg="Tunnel status" tunnelCheck="map[method:passive state:alive]" vpnIp=192.168.100.1
time="2023-02-21T14:34:07Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 8 58 255 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 133 0 103 142 0 0 0 0]"
time="2023-02-21T14:34:37Z" level=debug msg="Error while validating outbound packet: packet is not ipv4, type: 6" packet="[96 0 0 0 0 8 58 255 254 128 0 0 0 0 0 0 169 151 76 252 133 7 154 13 255 2 0 0 0 0 0 0 0 0 0 0 0 0 0 2 133 0 103 142 0 0 0 0]"
time="2023-02-21T14:34:42Z" level=debug msg="Generated index" index=495626409
time="2023-02-21T14:34:42Z" level=debug msg="Packet store" length=1 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:42Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:43Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:43Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:43Z" level=debug msg="Packet store" length=2 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:44Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:44Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:45Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:45Z" level=debug msg="Packet store" length=3 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:46Z" level=debug msg="Packet store" length=4 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:46Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:47Z" level=debug msg="Packet store" length=5 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:47Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:47Z" level=debug msg="Tunnel status" tunnelCheck="map[method:passive state:alive]" vpnIp=192.168.100.1
time="2023-02-21T14:34:49Z" level=debug msg="Packet store" length=6 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:49Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:49Z" level=debug msg="Packet store" length=7 stored=true vpnIp=192.168.100.2
time="2023-02-21T14:34:50Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:52Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:52Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:53Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:54Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:54Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:54Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:55Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:55Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:55Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:55Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:56Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:56Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:56Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:57Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:57Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:57Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:58Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:34:58Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:58Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:58Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:59Z" level=debug msg="Punching on 2781 for 192.168.100.2"
time="2023-02-21T14:34:59Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:34:59Z" level=debug msg="Punching on 4242 for 192.168.100.2"
time="2023-02-21T14:35:00Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:02Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:04Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:05Z" level=debug msg="Tunnel status" tunnelCheck="map[method:passive state:alive]" vpnIp=192.168.100.1
time="2023-02-21T14:35:07Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:10Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:13Z" level=info msg="Handshake message sent" handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:16Z" level=info msg="Handshake timed out" durationNs=33243499414 handshake="map[stage:1 style:ix_psk0]" initiatorIndex=495626409 remoteIndex=0 udpAddrs="[112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]" vpnIp=192.168.100.2
time="2023-02-21T14:35:16Z" level=debug msg="Hostmap hostInfo deleted" hostMap="map[indexNumber:495626409 mapName:pending mapTotalSize:0 remoteIndexNumber:0 vpnIp:192.168.100.2]"
time="2023-02-21T14:35:22Z" level=debug msg="Hostmap hostInfo deleted" hostMap="map[indexNumber:3546594933 mapName:main mapTotalSize:0 remoteIndexNumber:3641311362 vpnIp:192.168.100.1]"
time="2023-02-21T14:35:22Z" level=debug msg="Sending close tunnel message" udpAddr="xx.xx.xx.xx:4242" vpnIp=192.168.100.1
time="2023-02-21T14:35:22Z" level=info msg=Goodbye
@dongdongbh
Copy link
Author

dongdongbh commented Feb 22, 2023

Finally made relay work, I forgot add relay host on my client computer

relay:
  relays:
    - 192.168.100.1

There are two active tunnels, one is the lighthouse, the other is my client computer. There are three active addresses on the client computer tunnel, one is the the lighthouse ip, and one is my client computer address, the other one is my client computer's router public ip. I'm not sure the connection between my phone and client computer is works on relay or punching. I guess it works on relay since the ping delay is around two times of directly ping lighthouse.

The network is a bit unstable between client computer and phone. I found only if the phone first ping the lighthouse and client computer, then they can ping back to the phone. I have to make sure disable battery optmizer for nebula to make it work.

The ssh console output ssh -i id_rsa -p 2222 xx.xx.xx.xx -l user

$ list-hostmap
192.168.100.2: [112.64.195.178:2781 10.212.142.63:4242 192.168.122.1:4242]
192.168.100.3: [101.82.187.97:39011]

$ list-lighthouse-addrmap
192.168.100.1: {"192.168.100.1":{"reported":[{"ip":"xx.xx.xx.xx","port":4242}],"relay":[]}}
192.168.100.2: {"192.168.100.2":{"learned":[{"ip":"112.64.195.178","port":2781}],"reported":[{"ip":"10.212.142.63","port":4242},{"ip":"192.168.122.1","port":4242}],"relay":["192.168.100.1"]}}
192.168.100.3: {"192.168.100.3":{"learned":[{"ip":"101.82.187.97","port":39011}],"relay":[]}}

$ print-relays
{"Relays":[{"NebulaIp":"192.168.100.3","RelayForIps":

[{"Error":null,"Type":"forwarding","State":"established","PeerIp":"192.168.100.2","LocalIndex":2001840543,"RemoteIndex":419371349,"RelayedThrough":null}]},{"NebulaIp":"192.168.100.2","RelayForIps":

[{"Error":null,"Type":"forwarding","State":"established","PeerIp":"192.168.100.3","LocalIndex":4294893792,"RemoteIndex":653339614,"RelayedThrough":null}]}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant