Country Block
-
Trying out the email config: entered in the applicable settings, clicked Save, and this error appears:
Couldn't write values to file!
Navigating again to the email tab reveals this line:
Your settings have already been set. Would you like to overwrite your email settings?
Warning: file_get_contents(email_config.html): failed to open stream: No such file or directory in /usr/local/www/packages/countryblock/email.php on line 172
Uninstalling / re-installing doesn't seem to help :(
-
Trying out the email config: entered in the applicable settings, clicked Save, and this error appears:
Couldn't write values to file!
Navigating again to the email tab reveals this line:
Your settings have already been set. Would you like to overwrite your email settings?
Warning: file_get_contents(email_config.html): failed to open stream: No such file or directory in /usr/local/www/packages/countryblock/email.php on line 172
Uninstalling / re-installing doesn't seem to help :(
Are you leaving a field blank? If so which field?
EDIT: Which browser are you using? -
Are you leaving a field blank? If so which field?
EDIT: Which browser are you using?Yep, leaving Username and Password blank, as my ISP doesn't require that info. I can just use Gmail, if that will satisfy CB ?
Using Chrome.
EDIT: works great with Gmail (all fields filled in).
Thanks tho :)
-
All fields must be filled in for the email function to work.
Dont forget that for it to be able to restart CB you must have started it at least once. -
Could you post your gmail settings?
-
@DigitalJer set SMTP Auth = No and see if that works
@robfantini
You did the quote wrong.But heres the info you requested:
SMTP Auth = Yes
SMTP Security = Yes
Host = smtp.gmail.com (this is for gmail and GApps users)
Port = 465
User name = your full username (test@gmail.com)
Password = your password
Use HTML Formatting = Yes
From Email address = your full username (test@gmail.com)
To Email address = email you are sending notifications to
Subject = whatever you want -
@DigitalJer set SMTP Auth = No and see if that works
@robfantini
You did the quote wrong.But heres the info you requested:
SMTP Auth = Yes
SMTP Security = Yes
Host = smtp.gmail.com (this is for gmail and GApps users)
Port = 465
User name = your full username (test@gmail.com)
Password = your password
Use HTML Formatting = Yes
From Email address = your full username (test@gmail.com)
To Email address = email you are sending notifications to
Subject = whatever you wantthank you, that worked. I had been using the wrong port.
-
I get this when trying…
Parse error: syntax error, unexpected $end in /usr/local/www/packages/countryblock/email_send.php on line 6
-
I get this when trying…
Parse error: syntax error, unexpected $end in /usr/local/www/packages/countryblock/email_send.php on line 6
I had that happen until I filled in all fields , pressed save.
SMTP auth could not be set to no. Originally I wanted to use our local LAN mail server . I could only use my gmail smtp account.
-
any smtp account should work.
For the smtp auth did you still fill in the username and password when it was set to no?
-
nope….used mail instead of smtp...
-
any smtp account should work.
For the smtp auth did you still fill in the username and password when it was set to no?
I did set the account username and password .. I ended up with an ssl error.
Just checked the log on our postfix server.
Oct 6 08:42:15 mail postfix/smtpd[10912]: connect from fbc2.fantinibakery.com[10.100.100.2] Oct 6 08:42:15 mail postfix/smtpd[10912]: NOQUEUE: reject: RCPT from fbc2.fantinibakery.com[10.100.100.2]: 504 5.5.2 <root>: Sender address rejected: need fully-qualified address; from= <root>to= <rob>proto=ESMTP helo= <localhost.localdomain>Oct 6 08:42:15 mail postfix/smtpd[10912]: lost connection after RSET from fbc2.fantinibakery.com[10.100.100.2] Oct 6 08:42:15 mail postfix/smtpd[10912]: disconnect from fbc2.fantinibakery.com[10.100.100.2] Oct 6 08:42:34 mail postfix/smtpd[10870]: connect from fbc2.fantinibakery.com[10.100.100.2] Oct 6 08:42:34 mail postfix/smtpd[10870]: lost connection after UNKNOWN from fbc2.fantinibakery.com[10.100.100.2] Oct 6 08:42:34 mail postfix/smtpd[10870]: disconnect from fbc2.fantinibakery.com[10.100.100.2]</localhost.localdomain></rob></root></root>
Looks like the cb pgm works… must be due to not having the full mail address..
-
looks like the username was rejected as the mail server requires usernames to be like test@gmail.com instead of test.
-
looks like the username was rejected as the mail server requires usernames to be like test@gmail.com instead of test.
I tried to switch to non ssl and our local server.
at the top of the email settings is:
"Your settings have already been set. Would you like to overwrite your email settings?"
I click save below and
1- the ssl setting does not change
2- the messages stays at the top of the screen.I'm using firefox
i just checked /usr/local/www/packages/countryblock/email_send.php
include("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = false; $mail->SMTPSecure = "ssl"; $mail->Host = "10.100.100.14"; $mail->Port = 25; $mail->Username = "rob"; $mail->Password = "****"; $mail->AddReplyTo("root@fbc2.fantinibakery.com","pfsense countryblock"); $mail->From = "root@fbc2.fantinibakery.com"; $mail->Subject = "Countryblock - pfsense"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; $mail->WordWrap = 50; $body = "Countryblock encountered an event. A system log entry was made with details of event"; $body .= " " . date('l jS \of F Y h:i:s A') . " Current Status = "; ob_start(); $results = exec("pfctl -s rules | grep -c countryblock"); ob_end_clean(); if ($results > '0') $body .= "Running"; else $body .= "Restarting";
and ssl is set to false.
However and I just checked again - SMTP Auth is 'yes' .
so i from cli:
# php /usr/local/www/packages/countryblock/email_send.php Content-type: text/html Warning: fsockopen(): SSL operation failed with code 1\. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /usr/local/www/packages/countryblock/class.smtp.php on line 122 Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in /usr/local/www/packages/countryblock/class.smtp.php on line 122 Warning: fsockopen(): failed to activate SSL mode 1 in /usr/local/www/packages/countryblock/class.smtp.php on line 122 Mailer Error: SMTP Error: Could not connect to SMTP host.#
and the mail server log:
Oct 6 19:01:25 mail postfix/smtpd[18233]: connect from fbc2.fantinibakery.com[10.100.100.2] Oct 6 19:01:25 mail postfix/smtpd[18233]: lost connection after UNKNOWN from fbc2.fantinibakery.com[10.100.100.2] Oct 6 19:01:25 mail postfix/smtpd[18233]: disconnect from fbc2.fantinibakery.com[10.100.100.2]
-
I am also unable to change " HTML formatting " to no .
these are small issues and I am not complaining! if there is anything you'd like me to test then email a file or let me know what to do.
-
the message about settings already set will always be there.
I hope outside users connecting to your mail server use SSL otherwise all their passwords are sent in the clear
right now:
subject line does not get set
it only works with ssl connections because it is set to implement OpenSSL -
the message about settings already set will always be there.
I hope outside users connecting to your mail server use SSL otherwise all their passwords are sent in the clear
right now:
subject line does not get set
it only works with ssl connections because it is set to implement OpenSSLwe do use ssl for off site imap . and do not accept mail relays .
Anyways maybe I should try to setup internal ssl to make this work.
-
The SMTP Auth, SMTP Security, and Use HTML Drop down lists display the default values regardless of your settings. This is a bug, so just be aware that it may be displayed as one thing but it's another. This will be fixed soon now that it's identified.
I will also fix it so the password field will be black and the subject input will reflect on your emails. -
The SMTP Auth, SMTP Security, and Use HTML Drop down lists display the default values regardless of your settings. This is a bug, so just be aware that it may be displayed as one thing but it's another. This will be fixed soon now that it's identified.
I will also fix it so the password field will be black and the subject input will reflect on your emails.you know it would be great if you contributed around here a little faster ;-)
-
The SMTP Auth, SMTP Security, and Use HTML Drop down lists display the default values regardless of your settings. This is a bug, so just be aware that it may be displayed as one thing but it's another. This will be fixed soon now that it's identified.
I will also fix it so the password field will be black and the subject input will reflect on your emails.you know it would be great if you contributed around here a little faster ;-)
Sorry it's almost been 24 hours since my last version release.
With that being said….. :)Version 1.9 Released!
Changes:
- Fixed all email bugs (see robfantini's post)
The drop down lists now reflect your saved settings. The password can be blank. Your subject input is now the email subject as it should be.
-
all i can say is WOW!
The fastest updates I have ever seen lol..
Thanks again!!! This package has made pfsense awesome! -
all i can say is WOW!
The fastest updates I have ever seen lol..
Thanks again!!! This package has made pfsense awesome!OK you might want to edit that.
-
Ive noticed since uninstalling cron that I have fewer system log entry's than I had before daily before installing cron… Just including this to say that something that was updating is no longer and may be something that was stopping Country Block before..... Interesting...
But...
Awsome Job Tom! Thank You!
-
Ive noticed since uninstalling cron that I have fewer system log entry's than I had before daily before installing cron… Just including this to say that something that was updating is no longer and may be something that was stopping Country Block before..... Interesting...
But...
Awsome Job Tom! Thank You!
Even with the new cron script that was updated back at version 1.8?
And thank you for your support! -
all i can say is WOW!
The fastest updates I have ever seen lol..
Thanks again!!! This package has made pfsense awesome!OK you might want to edit that.
Well pfsense is awesome already and the supporting people that keep it top notch make it better than anything else in the league. This package has made it even better for me. It is something that I was looking for that nothing else would offer for me. Well, within a reasonable price that I could afford that is. So to get continued updates/modifications ect is awesome. Even with paid software I havent seen this quick of a turn around when things are identified.
-
all i can say is WOW!
The fastest updates I have ever seen lol..
Thanks again!!! This package has made pfsense awesome!OK you might want to edit that.
Well pfsense is awesome already and the supporting people that keep it top notch make it better than anything else in the league. This package has made it even better for me. It is something that I was looking for that nothing else would offer for me. Well, within a reasonable price that I could afford that is. So to get continued updates/modifications ect is awesome. Even with paid software I havent seen this quick of a turn around when things are identified.
I agree , and you know my comment was an almost failed attempt at humor.
Seriously CB is something I was waiting for , it has cut our mail server's work load 90% .
-
Way to go TB on the CB. Your updates have been fast and great with awsome enhancements. I do have a request. Is there a way to maintain your saved settings after doing updates. I will always have to put the CIDR back in my whitelist. I whitelist all the BlackBerry RIM IP's and was wondering if there was a way to maintain youe whitelist in between updates?
Thanks again for this awsome package. I do agree it really adds a lot of value to pfsense. Not many firewalls out there that I know of can do this. And please if anyone can think of another firewall that has the ability to do this, please tell.
Thanks,
Matt
-
all i can say is WOW!
The fastest updates I have ever seen lol..
Thanks again!!! This package has made pfsense awesome!OK you might want to edit that.
Well pfsense is awesome already and the supporting people that keep it top notch make it better than anything else in the league. This package has made it even better for me. It is something that I was looking for that nothing else would offer for me. Well, within a reasonable price that I could afford that is. So to get continued updates/modifications ect is awesome. Even with paid software I havent seen this quick of a turn around when things are identified.
I agree , and you know my comment was an almost failed attempt at humor.
Seriously CB is something I was waiting for , it has cut our mail server's work load 90% .
lol I got it. Just wanted to give ppl some kudos lol ;D
-
TB, once again, you have my thanks!
-
-
Way to go TB on the CB. Your updates have been fast and great with awsome enhancements. I do have a request. Is there a way to maintain your saved settings after doing updates. I will always have to put the CIDR back in my whitelist. I whitelist all the BlackBerry RIM IP's and was wondering if there was a way to maintain youe whitelist in between updates?
Thanks again for this awsome package. I do agree it really adds a lot of value to pfsense. Not many firewalls out there that I know of can do this. And please if anyone can think of another firewall that has the ability to do this, please tell.
Thanks,
Matt
The file that holds your whitelist settings is /usr/local/www/packages/countryblock/whitelist.txt You can save that file and re-upload it after your updates to preserve your settings.
Thank you for your support! -
No updates for 48 hours? Hope your all right ;)
-
LOL. Yeah he has been pumping the updates out like crazy. This last update seems to be rock solid for me. Also Tommy, I appreciate the insight on the whitelist.
Thanks,
-
LOL. Yeah he has been pumping the updates out like crazy. This last update seems to be rock solid for me. Also Tommy, I appreciate the insight on the whitelist.
Thanks,
Thank you for the support! I don't think I will be pushing any countryblock updates in the near future. I need fix some other projects for the mean time and hopefully get some IPblocklist updates out there.
-
TB,
With the most recent package I am having a problem when I reboot the firewall. I am on the most current beta as well as of today.
When I reboot, country block will not be running even though the enable country block is checked at the top.
If I click save at the bottom and it refreshes no change. Still blocking 0 networks. Then I uncheck save then recheck and save same thing.
I do have a cron job set of it and when checking the sys logs I see this error.php: /packages/countryblock/countryblock.php: The command 'sh execute.sh' returned exit code '2', the output was '0 table deleted. sed: /tmp/rules.debug: No such file or directory grep: /tmp/rules.debug: No such file or directory grep: /tmp/rules.debug: No such file or directory 1 1 rm: /tmp/rules.debug.tmp: No such file or directory sed: /tmp/rules.debug: No such file or directory execute.sh: cannot open /tmp/rules.debug: No such file or directory'
If I reinstall the package, it will start working again. I have duplicated this multiple times this evening when rebooting the firewall.
Any reason why? -
TB,
With the most recent package I am having a problem when I reboot the firewall. I am on the most current beta as well as of today.
When I reboot, country block will not be running even though the enable country block is checked at the top.
If I click save at the bottom and it refreshes no change. Still blocking 0 networks. Then I uncheck save then recheck and save same thing.
I do have a cron job set of it and when checking the sys logs I see this error.php: /packages/countryblock/countryblock.php: The command 'sh execute.sh' returned exit code '2', the output was '0 table deleted. sed: /tmp/rules.debug: No such file or directory grep: /tmp/rules.debug: No such file or directory grep: /tmp/rules.debug: No such file or directory 1 1 rm: /tmp/rules.debug.tmp: No such file or directory sed: /tmp/rules.debug: No such file or directory execute.sh: cannot open /tmp/rules.debug: No such file or directory'
If I reinstall the package, it will start working again. I have duplicated this multiple times this evening when rebooting the firewall.
Any reason why?If /tmp/rules.debug isn't found then your problem isn't countryblock. Are you running pfsense in transparent mode or is it even a Firewall? /tmp/rules.debug is the file that contains the pf firewall rules.
-
On some systems , /tmp is cleared on reboot .
Try copying some other files to /tmp , reboot and see if they exist after a reboot.
If /tmp is cleared on reboot, then /tmp/rules.debug should be stored in another location. like /var/tmp . on our system /var/tmp is not cleared on reboot.
-
It seems as if this is what is happening. That folder is being cleared upon reboot. I dont have anything specially configured to do that so so something must do that in the beta version when its booting as a startup script.
Does that TMP location pull the rules from elsewhere. The only app that seems to be affected by this is country block. Snort and other packages seem to be working just fine.
TB i have it set as a firewall. Its the Internet facing firewall at my location.
So either this is a change in most recent beta or how the newer package of CB is handling this. It was working ok on an older beta version and the 1.5 cb when I rebooted just fine.
-
Perhaps the startup script is running before your firewall rules are re-created.
Have you tried to manually run Countryblock after the system has booted, from the GUI? -
Yes I have gone into CB and deselected enable CB then clicked the save button at the bottom. (in red it says blocking 0 countries)
Then I re check the enable CB and click save at the bottom and the check now appears in the enable option but there is red text at the bottom that says blocking 0 countries.
There are countries enabled as I use the most spamming ones at the top of the list and says what is it 10 out of x amount enabled.The only way I can get the red text at the bottom to go away and turn into black saying you are currently blocking x countries is to reinstall the package..