jvinet / knock

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

knockd does not work with CARP virtual IP #61

Closed DavisR-GitHub closed 5 years ago

DavisR-GitHub commented 5 years ago

Hi all, I have CARP VIP implemented on WAN interfaces of my routers. So on each router public interface has own IP and one of routers has also HA IP. On MASTER router:

#ifconfig pif
pif: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether TTTTTTTTTT
        hwaddr TTTTTTTTTT
        inet 10.255.255.1 netmask 0xfffffffc broadcast 10.255.255.3
        inet X.X.X.X netmask YYYYYY broadcast Z.Z.Z.Z vhid 1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        carp: MASTER vhid 1 advbase 1 advskew 0

Here X.X.X.X is a single public "white" IP of my routers. Problem is that knockd ignores traffic to X.X.X.X, it reacts only on traffic to 10.255.255.1 what is useless in this case. Is it possible to listen all IPs on interface?

DavisR-GitHub commented 5 years ago

I have to tell that my message was about version 0.5 that is only available in FreeBSD as package. This latest 0.7.8 version not just uses all IPs for interface but even has new parameter Target that allows to specify CARP virtual IP. Great