From 9442e2b5ff943e79f1340aecbc784c1344cb7dd4 Mon Sep 17 00:00:00 2001 From: William Sutton Date: Fri, 11 Sep 2020 15:36:07 -0400 Subject: [PATCH] Update pfatt.sh These are the small changes I had to make based on various forum posts as well as the issues tracker here. They work across reboots with the existing instructions on a bare metal installation of pfsense. As far as I can tell, they simply clear out incomplete configs if they are present, specify a mac address, and change the wpa_supplicant interface to be the physical hardware interface, rather than the netgraph one. --- bin/pfatt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/pfatt.sh b/bin/pfatt.sh index 47bc00d..82fdfae 100755 --- a/bin/pfatt.sh +++ b/bin/pfatt.sh @@ -144,6 +144,7 @@ elif [ "$EAP_MODE" = "supplicant" ] ; then /usr/bin/logger -st "pfatt" "cabling should look like this:" /usr/bin/logger -st "pfatt" " ONT---[] [$ONT_IF]$HOST" /usr/bin/logger -st "pfatt" "creating vlan node and ngeth0 interface..." + /usr/local/bin/php -r "pfSense_ngctl_attach('.', '$ONT_IF'); /usr/sbin/ngctl mkpeer $ONT_IF: vlan lower downstream /usr/sbin/ngctl name $ONT_IF:lower vlan0 /usr/sbin/ngctl mkpeer vlan0: eiface vlan0 ether @@ -151,6 +152,7 @@ elif [ "$EAP_MODE" = "supplicant" ] ; then /usr/sbin/ngctl msg ngeth0: set $RG_ETHER_ADDR /usr/bin/logger -st "pfatt" "enabling promisc for $ONT_IF..." + /sbin/ifconfig $ONT_IF ether $EAP_SUPPLICANT_IDENTITY /sbin/ifconfig $ONT_IF up /sbin/ifconfig $ONT_IF promisc @@ -172,7 +174,7 @@ elif [ "$EAP_MODE" = "supplicant" ] ; then enable_network 0\ " - WPA_DAEMON_CMD="/usr/sbin/wpa_supplicant -Dwired -ingeth0 -B -C /var/run/wpa_supplicant" + WPA_DAEMON_CMD="/usr/sbin/wpa_supplicant -Dwired -i$ONT_IF -B -C /var/run/wpa_supplicant" # kill any existing wpa_supplicant process PID=$(pgrep -f "wpa_supplicant.*ngeth0")