fritsp1989
Regular Contributor
Hello i am trying to understand the basics of scripting for my router and i got a script from this forum to wake up my computer when trying to acces a port on my router.
I am adjusting it to my needs so it will listen to destination AND ports instead of only the destination.
This is the original line:
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ {print }' | tail -1`
This is my new one
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ && /DPT='"$PORTS"'/{print }' | tail -1`
Now in the top of the file i need to specify :
PORTS=
But how do i argument multiple ports for example 80 443 8080
Should that be : or || ?
I am not sure i googled it but i did not found what i was looking for.
Does anyone have suggestions ?
I am adjusting it to my needs so it will listen to destination AND ports instead of only the destination.
This is the original line:
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ {print }' | tail -1`
This is my new one
NEW=`dmesg | awk '/ACCEPT/ && /DST='"$TARGET"'/ && /DPT='"$PORTS"'/{print }' | tail -1`
Now in the top of the file i need to specify :
PORTS=
But how do i argument multiple ports for example 80 443 8080
Should that be : or || ?
I am not sure i googled it but i did not found what i was looking for.
Does anyone have suggestions ?