NICMx / FORT-validator

RPKI cache validator
MIT License
47 stars 23 forks source link

Will not bind to IPv6 address #44

Closed sebastianw closed 3 years ago

sebastianw commented 3 years ago

Hello,

fort 1.4.2 will not bind to an IPv6 address. I tried to bind it to "::" (IPv6 Any) but it wouldn't do that even though the log says it does:

Dec  9 11:35:31 noc2 fort[25499]: INF: Attempting to bind socket to address '::', port '323'.
Dec  9 11:35:31 noc2 fort[25499]: INF: Success; bound to address '::', port '323'.
Dec  9 11:35:31 noc2 fort[25499]: INF: Starting validation.

But it is not bound, netstat -tulpen shows no open port, connecting is not possible.

When I start fort without a server.address it binds to 0.0.0.0 which is v4 only.

configuration is:

{
    "tal": "/etc/fort/tal",
    "local-repository": "/var/lib/fort",
    "slurm": "/etc/fort/slurm/",
    "server": {
        "address": ["::"],
        "port": "323"
    },
    "log": {
        "output": "syslog",
        "level": "info"
    }
}

I installed it via the .deb from the releases here on github, Debian version is 10.6.

sebastianw commented 3 years ago

Okay this is weird, after completely removing the address config it is still no longer binding:

Dec 09 11:44:03 noc2 fort[25908]: INF: Attempting to bind socket to address 'any', port '323'.
Dec 09 11:44:03 noc2 fort[25908]: INF: Success; bound to address 'any', port '323'.
Dec 09 11:44:03 noc2 fort[25908]: INF: Starting validation.
root@noc2:/etc/fort# netstat -tulpen | fgrep 323
root@noc2:/etc/fort#
sebastianw commented 3 years ago

Ah disregard. Even though it says it binds right at startup, it actually does a complete validation run before binding. :( Seems I was to impatient to wait for that.

pcarana commented 3 years ago

Glad you could solve the issue @sebastianw . You're right regarding the bind message, it can be quite confusing.

In the upcoming v1.5.0 we'll add a message to clarify that the server will listen for requests until it ends its first validation cycle.