OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: FredFresh on March 31, 2026, 06:08:53 PM

Title: Cron script [NOT SOLVED]
Post by: FredFresh on March 31, 2026, 06:08:53 PM
Hi,

I created this working script for the Cron

[START]
command:traceroute -g 127.0.0.1 10.2.0.1
parameters:
type:script
message:Automatic traceroute to 10.2.0.1
description:Automatic traceroute to 10.2.0.1

How should I modify it in order to pass as parameterthe ip to trace route (10.2.0.1)?

Thank you
Title: Re: Cron script
Post by: nero355 on March 31, 2026, 08:11:14 PM
You are aware of https://docs.opnsense.org/manual/diagnostics_interfaces.html#trace-route or not ?

You can create a "Traceroute Job" there too.
Title: Re: Cron script
Post by: FredFresh on March 31, 2026, 08:49:00 PM
Yes I am aware, but I need to schedule it because of a particular issue.
Title: Re: Cron script
Post by: FredFresh on April 04, 2026, 12:43:01 PM
Up
Title: Re: Cron script
Post by: franco on April 08, 2026, 01:24:44 PM
[START]
command:traceroute -g 127.0.0.1
parameters:%s
type:script
message:Automatic traceroute to %s
description:Automatic traceroute


From GUI set custom parameter field to 10.2.0.1

Description must be static.
Title: Re: Cron script
Post by: FredFresh on April 11, 2026, 03:39:48 PM
unfortunately it seems it does not work properly. The log returns:
 <4>[1447] attempted source route from 10.3.0.2 to 127.0.0.1

the command is executed but the IPs are reversed.

@franco: suggestions? thanks
Title: Re: Cron script [NOT SOLVED]
Post by: FredFresh on April 11, 2026, 10:52:36 PM
Reply wrongly created