From 32aa80849f638b1b813fc6350987fc5abeb855bc Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Tue, 6 May 2025 09:22:42 +0200 Subject: [PATCH] Fix `route` command for IPv6 Route needs to know we're passing it an IPv6 address: ``` # route -n get fec0:0:0:3::80 route: bad address: fec0:0:0:3::80 ``` --- usr/local/share/bastille/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/start.sh b/usr/local/share/bastille/start.sh index 9226560c..81046c67 100644 --- a/usr/local/share/bastille/start.sh +++ b/usr/local/share/bastille/start.sh @@ -173,7 +173,7 @@ for _jail in ${JAILS}; do warn "[WARNING]: IP address (${_ip}) already in use, continuing..." fi ## add ip to firewall table if it is not reachable through local interface (assumes NAT/rdr is needed) - if route -n get ${_ip} | grep "gateway" >/dev/null; then + if route -6 -n get ${_ip} | grep "gateway" >/dev/null; then pfctl -q -t "${bastille_network_pf_table}" -T add "${_ip}" fi else