What's new

dnsmasq and pxe

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Mobo1964

Occasional Visitor
I'm trying to get pxe working on my RT-AC66U.

I placed dhcp-boot=pxelinux.0,,192.168.0.1 in /jffs/configs/dnsmasq.conf.add and even in /jffs/configs/dnsmasq.postconf but both are not working.

Also tried when copying dnsmasq.conf to /jffs/scripts and add the dhcp-boot option to it.

When I check nvram show | grep pxelinux or nvram show | grep dhcp-boot there is nothing.

Anyone?:confused:
 
Last edited:
I'm trying to get pxe working on my RT-AC66U.

I placed dhcp-boot=pxelinux.0,,192.168.0.1 in /jffs/configs/dnsmasq.conf.add and even in /jffs/configs/dnsmasq.postconf but both are not working.

Also tried when copying dnsmasq.conf to /jffs/scripts and add the dhcp-boot option to it.

Did you either reboot the router or restart the dnsmasq service after doing these changes?

When I check nvram show | grep pxelinux or nvram show | grep dhcp-boot there is nothing.

There's no reason for any of these strings to ever appear in nvram.
 
I did a reboot several times.

At this moment I have a copy of dnsmasq.conf located /jffs/configs with the dhcp-boot=pxelinux.0,,192.168.0.1 added.

Is there a method to see of these settings are added to dnsmasq?


There is another strange thing I discoverd.

At /jffs/scripts I have wan-start

-rwxrwxrwx 1 admin root 295 Nov 30 18:38 wan-start*

this should also start after a reboot and sent an gmail notification, and other things. This is also not starting.


admin@RT-AC66U:/jffs/scripts# cat wan-start
#!/bin/bash
sh gmail-notification

date >/tmp/wan-start.txt
sh vpn-reroute
echo "" >>/tmp/wan-start.txt
echo "VPN Reroute script running" >>/tmp/wan-start.txt
echo "" >>/tmp/wan-start.txt

echo "Mail startup script running" >>/tmp/wan-start.txt
echo "" >>/tmp/wan-start.txt


Gmail-Notification

admin@RT-AC66U:/jffs/scripts# cat gmail-notification
#!/bin/sh
FROM="xxx@gmail.com"
AUTH="xxx@gmail.com"
PASS="xxx"
FROMNAME="Asus RT-AC66U mijn Router"
TO="xxx@gmail.com"

ntpclient -h pool.ntp.org -s &> /dev/null
sleep 5

echo "Subject: WAN state notification" >/tmp/mail.txt
echo "From: \"$FROMNAME\"<$FROM>" >>/tmp/mail.txt
echo "Date: `date -R`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "I just got connected to the internet." >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "My WAN IP is: `nvram get wan0_ipaddr`" >>/tmp/mail.txt
echo "Uptime is: `uptime | cut -d ',' -f1 | sed 's/^.\{12\}//g'`" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "" >>/tmp/mail.txt
echo "---- " >>/tmp/mail.txt
cat /tmp/wan-start.txt >>/tmp/mail.txt
echo "---- " >>/tmp/mail.txt
echo "Your friendly router." >>/tmp/mail.txt
echo "" >>/tmp/mail.txt

cat /tmp/mail.txt | sendmail -H"exec openssl s_client -quiet \
-CAfile /jffs/configs/Equifax_Secure_Certificate_Authority.pem \
-connect smtp.gmail.com:587 -tls1 -starttls smtp" \
-f"$FROM" \
-au"$AUTH" -ap"$PASS" $TO

rm /tmp/mail.txt
rm /tmp/wan-start.txt
 
I did a reboot several times.

At this moment I have a copy of dnsmasq.conf located /jffs/configs with the dhcp-boot=pxelinux.0,,192.168.0.1 added.

Is there a method to see of these settings are added to dnsmasq?

Just see if /etc/dnsmasq.conf contains it.

There is another strange thing I discoverd.

At /jffs/scripts I have wan-start

-rwxrwxrwx 1 admin root 295 Nov 30 18:38 wan-start*

this should also start after a reboot and sent an gmail notification, and other things. This is also not starting.
Code:
admin@RT-AC66U:/jffs/scripts# cat wan-start
#!/bin/bash
sh gmail-notification

There's no Bash in the firmware. You must use #!/bin/sh as the shebang.
 
#!/bin/sh was the solution, Now pxe is also running.

Thanks for the support
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top