From LedHed's Wiki
(Created page with "This is a repost, all credit goes to the author of the blog post in the reference section. ---- If you're using DHCP to get your public IP, Smoothwall doesn't allow you to...") |
(No difference)
|
Latest revision as of 03:28, 24 August 2014
This is a repost, all credit goes to the author of the blog post in the reference section.
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=208.67.222.222" and "DNSMASQ_DNS2=208.67.220.220" at the bottom of the DHCP section, making the file look like this:
#!/bin/sh
. /var/smoothwall/ethernet/settings
if [ "$RED_TYPE" = "DHCP" ]; then
DNSMASQ_DNS1=`/usr/bin/smoothwall/getdnsfromdhcpc.pl 1`
DNSMASQ_DNS2=`/usr/bin/smoothwall/getdnsfromdhcpc.pl 2`
. /var/lib/dhcpc/dhcpcd-${RED_DEV}.info
echo "$IPADDR" >/var/smoothwall/red/local-ipaddress
echo "$GATEWAY" >/var/smoothwall/red/remote-ipaddress
DNSMASQ_DNS1=208.67.222.222 <------- HERE
DNSMASQ_DNS2=208.67.220.220 <------- HERE
elif [ "$RED_TYPE" = "STATIC" ]; then
DNSMASQ_DNS1=$DNS1
DNSMASQ_DNS2=$DNS2
echo "$RED_ADDRESS" >/var/smoothwall/red/local-ipaddress
echo "$DEFAULT_GATEWAY" >/var/smoothwall/red/remote-ipaddress
fi
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
/usr/bin/smoothwall/setddns.pl
/usr/bin/smoothwall/updatelists.pl
/etc/rc.d/rc.vpn.up
/etc/rc.d/rc.machineregister
The next time you Smoothwall connects, the setting you just put will override the ones from your ISP. Reboot or reconnect to apply.
References
http://blog.dhampir.no/content/use-opendns-with-smoothwall-express-3-x