jvinet / knock

A port-knocking daemon
http://www.zeroflux.org/projects/knock
GNU General Public License v2.0
552 stars 114 forks source link

knockd doesn't bind to all IPs assigned to an interface #7

Closed visit1985 closed 8 years ago

visit1985 commented 10 years ago

Have the following setup on arch linux using netctl:

# ip addr show dev enp2s0
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 3c:d9:2b:78:d1:fa brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.10/24 brd 192.168.178.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet 172.20.178.10/24 brd 172.20.178.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::3ed9:2bff:fe78:d1fa/64 scope link 
       valid_lft forever preferred_lft forever

debug log tells:

 ...
 config: interface: enp2s0
 ...
 ethernet interface detected
 Local IP: 192.168.178.10
 Adding pcap expression for door 'opencloseSSH': (dst host 192.168.178.10 and (((tcp dst port...

knockd picks only the first IP assigned to the interface which could be changed randomly on every boot.

airwoflgh commented 8 years ago

Will look into fixing this in combination with Issue 21 on my fork.

visit1985 commented 8 years ago

@airwoflgh I proposed a fix in #17.

airwoflgh commented 8 years ago

Great - will have it merged in to my fork.

airwoflgh commented 8 years ago

Merged and pull request made back into master.