Solved Cannot access internet in FreeBSD (cannot ping google.com but able to ping 8.8.8.8)

What happens if you run drill @10.82.1.254 google.com? Also, what does freebsd-version -ru show you?

Don't bother with an /etc/pf.conf file for now, that can only obfuscate things. Right now I'm starting to think that the cause of your problem lies elsewhere. This is of course assuming that you didn't set up any other firewalls. FreeBSD has 3: ipfw, ipf and pf. Basically: firewall_enable, ipfilter_enable or pf_enable. So if you have any other options in your /etc/rc.conf then that could also be a possible cause.

pfbother.PNG


my rc.conf doesn't have any other firewalls to my concern, only pf_enable and i have commented it out . and i have syslogd_enable="YES" im not sure what that is.
 
i have commented out the " syslogd_flags=-s -b 127.0.0.1" and the syntax error is gone .i'm still figuring out to fix my main problem
You need to put quotes around the value because it contains spaces:
Code:
syslogd_flags="-s -b 127.0.0.1"
Otherwise the shell interprets it as a command called -b (with command line argument 127.0.0.1) that is to be run with syslogd_flags=-s in its environment. Of course there is no command -b, so you get that error each time the file is read by the rc framework.
 
You need to put quotes around the value because it contains spaces:
Code:
syslogd_flags="-s -b 127.0.0.1"
Otherwise the shell interprets it as a command called -b (with command line argument 127.0.0.1) that is to be run with syslogd_flags=-s in its environment. Of course there is no command -b, so you get that error each time the file is read by the rc framework.

okay, i understand. thankyou olli .i have corrected the syntax error.
 
You need to fix your pf.conf or disable your pf. Also if you don't need lo1 you can remove it. To do this use the following commands
sysrc -x pf_enable
sysrc -x pf_rules
sysrc -x cloned_interfaces
sysrc -x local_unbound
shutdown -r now
 
You need to verify with your ISP what your DNS server IP addresses are. You have no idea if they block DNS to everywhere else except their DNS servers. Turn of PF. Get the basic stuff working and expand from that.

If you can get a little more advanced, security/nmap is your friend.
 
Well, it's pretty obvious that your internet provider is blocking DNS queries (maybe this is common or even a legal requirement in Malaysia?). You need to ask your internet provider for the addresses of his DNS servers, and then use those addresses inside your /etc/resolv.conf.
(NB: Of course there are ways to circumvent DNS blocking, but that's a more advanced topic.)
 
Back
Top