Use OpenDNS with Smoothwall Express 3.x

If you’re using DHCP to get your public IP, Smoothwall doesn’t allow you to override the DNS addresses given by your ISP through the DHCP protocol. Time to override Smoothwall 🙂

Edit /etc/rc.d/rc.updatered, and add “DNSMASQ_DNS1=” and “DNSMASQ_DNS2=” at the bottom of the DHCP section, making the file look like this:


. /var/smoothwall/ethernet/settings

if [ "$RED_TYPE" = "DHCP" ]; then
 DNSMASQ_DNS1=`/usr/bin/smoothwall/ 1`
 DNSMASQ_DNS2=`/usr/bin/smoothwall/ 2`
 . /var/lib/dhcpc/dhcpcd-${RED_DEV}.info
 echo "$IPADDR" >/var/smoothwall/red/local-ipaddress
 echo "$GATEWAY" >/var/smoothwall/red/remote-ipaddress
elif [ "$RED_TYPE" = "STATIC" ]; then
 echo "$RED_ADDRESS" >/var/smoothwall/red/local-ipaddress
 echo "$DEFAULT_GATEWAY" >/var/smoothwall/red/remote-ipaddress

echo -n "$RED_DEV" >/var/smoothwall/red/iface
touch /var/smoothwall/red/active
echo "$DNSMASQ_DNS1" >/var/smoothwall/red/dns1
echo "$DNSMASQ_DNS2" >/var/smoothwall/red/dns2

/usr/bin/smoothcom dnsproxyrestart $DNSMASQ_DNS1 $DNSMASQ_DNS2

/usr/bin/smoothcom setxtaccess
/usr/bin/smoothcom setincoming
/usr/bin/smoothcom snortrestart
/usr/bin/smoothcom upnpdrestart
/usr/bin/smoothcom trafficrestart



The next time you Smoothwall connects, the setting you just put will override the ones from your ISP. Reboot or reconnect to apply.

Leave a Reply

Your email address will not be published. Required fields are marked *