Sonicwall logs flooded with: destination for 255.255.255. 255 is not allowed by access control

I recently deployed a Sonicwall TZ200 (fw version: SonicOS Enhanced 5.6.0.11-61o) and after setting up SSLVPN access, the logs were being flooded with the following message:

1		03/20/2013 13:13:55.416	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
2		03/20/2013 13:13:51.672	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
3		03/20/2013 13:13:50.896	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
4		03/20/2013 13:13:50.176	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
5		03/20/2013 13:13:46.752	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
6		03/20/2013 13:13:46.016	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control				
7		03/20/2013 13:13:45.464	Info	SSLVPN	destination for 255.255.255.255 is not allowed by access control

I found a few discussion threads pertaining to this issue on the Sonicwall forums and I tried some of the solutions offered but none of them worked. If you have an account on the forums, you can see these discussions here:

https://forum.sonicwall.com/showthread.php?t=25636&highlight=destination+255.255.255.255

https://forum.sonicwall.com/showthread.php?t=24107&highlight=destination+255.255.255.255

https://forum.sonicwall.com/showthread.php?t=27473&highlight=destination+255.255.255.255

Through trial and error, I noticed that the messages stopped appearing in the logs (not immediately after, I might add) after disabling “Communication Between Clients” under SSL VPN -> Client Settings, and adding “WAN RemoteAccess Networks” to the Access List for the SSLVPN Services group (on the VPN Access tab) under Users -> Local Groups. The messages returned upon reversing these changes. I also noticed that whenever I enabled/disabled “Communication Between Clients”, the following error message was logged:

Adding L2TP IP pool Address object Failed.

I’m not sure if they’re related but they appeared to coincide. This doesn’t seem like the best remedy but at the time I wasn’t able to update the firmware on this device, so this was the next best thing. I’ll update this post once when I get a chance to update the firmware.

Configure Windows Server 2008/2012 To Sync With Internet Time Servers

Question: There is no “Internet Time” tab in the date/time dialog box on Windows Server, is it still possible to configure the server to use NTP? If so, how?

Answer: Yes, as far as I know, you have to do this from the command prompt. Here’s how:

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"time-a.nist.gov, time-b.nist.gov, time-c.nist.gov, time-d.nist.gov"
w32tm /config /reliable:yes
net start w32time

That will configure the time service to sync with the list of servers (time-*.nist.gov in the above example) and it also tells the server that it is a reliable time source that client machines on your domain can sync with (i.e., w32tm /config /reliable:yes).

If you need to view the NTP configuration, type the following command from a prompt:

w32tm /query /configuration

This produces the following output:

[Configuration]

EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 172800 (Local)
MaxPosPhaseCorrection: 172800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 3600 (Local)
Type: NTP (Local)
NtpServer: time-a.nist.gov, time-b.nist.gov, time-c.nist.gov, time-d.nist.gov (Local)

NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

VMICTimeProvider (Local)
DllName: C:\Windows\System32\vmictimeprovider.dll (Local)
Enabled: 0 (Local)

Adding a Samba 4.0.3 Domain Member to a Windows Server 2012 Domain, the hard way.

I recently had the joy of upgrading a Win2k functional level domain to Win2k12. After upgrading the functional level of the domain to Win2k3, installing the new Win2k12 domain controller and upgrading the functional level (again) to Win2k12, and ensuring all existing Windows XP/7 workstations are applying GPOs correctly (a pain in the ass, in and of itself), it was time to reconfigure our Samba file servers to use the new domain controller. This is where the trouble began. These servers were running Samba version 3.old-as-hell, as such, they can’t communicate with a Win2k12 domain controller. Sure, you could disable SMB signing on the server and put in place a few other hacks floating around on the Internet but you’d still have to deal with the fact that (if I’m not mistaken) < Samba 3.5.x doesn't speak SMB 2.0. So they needed to be upgraded. After running apt-get upgrade and realizing that in order to get the version of Samba I needed, I'd have to upgrade the distro as well -- this particular machine was still running Ubuntu 9.04 (Jaunty)... Yeah. I also had another option: compile/install from source. After downloading Samba 4.0.3, compiling, installing, etc. There were a few problems:

  • The source installation installs in /usr/local/samba. This is different from where the distribution package installs.
  • … because of this, all the necessary libraries and other items required to run are not in the “correct” locations. Two words: symbolic links.

There’s probably an innumerable amount of ways to resolve this issue and get the new Samba installation up and running; here’s what I did:

Get to symlinkin’

mv /lib/libnss_winbind.so /lib/libnss_winbind.so.old
mv /lib/libnss_winbind.so.2 /lib/libnss_winbind.so.2.old
ln -s /usr/local/samba/lib/libnss_winbind.so /lib/libnss_winbind.so
ln -s /usr/local/samba/lib/libnss_winbind.so.2 /lib/libnss_winbind.so.2
mv /usr/sbin/smbd /usr/sbin/smbd.old
mv /usr/sbin/nmbd /usr/sbin/nmbd.old
mv /usr/sbin/winbindd /usr/sbin/winbindd.old
ln -s /usr/local/samba/sbin/smbd /usr/sbin/smbd
ln -s /usr/local/samba/sbin/nmbd /usr/sbin/nmbd
ln -s /usr/local/samba/sbin/winbindd /usr/sbin/winbindd
mv /etc/samba /etc/samba.old
ln -s /usr/local/samba/etc /etc/samba
mv /usr/local/samba/private/secrets.tdb /usr/local/samba/private/secrets.tdb.old
ln -s /var/lib/samba/secrets.tdb /usr/local/samba/private/secrets.tdb
mv /usr/bin/net /usr/bin/net.old
ln -s /usr/local/samba/bin/net /usr/bin/net

Symlink Bonus: I was even able to use the init scripts left over from the distro package for starting/stopping smbd, nmbd, and winbindd (/etc/init.d/{samba,winbind}).

So now what? Samba is all setup, albeit in a duct-tape-and-zip-tie fashion, so now we move on to configuration. Here is an excellent blog post detailing how to do this — I only deviated from these instructions slightly, regardless, I’ll post my configuration (with sensitive parts obfuscated) for posterity.

/etc/krb5.conf

[libdefaults]
  default_realm = MYDOMAIN.INTERNAL
  default_tgs_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5 des3-hmac-sha1
  default_tkt_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5 des3-hmac-sha1
  clockskew = 300 
 
[realms]
  DYERASSOC.INTERNAL = { 
    kdc = myserver.mydomain.internal
    kdc = 192.168.0.250
    default_domain = mydomain.internal
}

[domain_realm]
 domain.com = MYDOMAIN.INTERNAL
  .domain.com = MYDOMAIN.INTERNAL
 
[appdefaults]
  pam = { 
    debug = false
    ticket_lifetime = 1d
    renew_lifetime = 1d
    forwardable = true
    proxiable = false
    retain_after_close = false
    minimum_uid = 500 
    try_first_pass = true
}

You’ll notice that I have two KDCs specified; you don’t need two, one will suffice.

/etc/samba/smb.conf

#Global Settings
[global]
    workgroup = MYDOMAIN
    server string = File Server
    netbios name = fileserver01
    log level = 3
    # logs split per machine
    log file = /var/log/samba/%m.log
    # max 50KB per log file, then rotate
    max log size = 50
    security = ADS 
    realm = MYDOMAIN.INTERNAL
    encrypt passwords = yes 
    winbind enum users = Yes 
    winbind enum groups = Yes 
    winbind use default domain = Yes 
    winbind nested groups = Yes 
    winbind separator = / 
    idmap backend = tdb 
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    idmap config * : range = 10000 - 20000 
#    idmap config MYDOMAIN : backend = rid
#    idmap config MYDOMAIN : range = 10000 - 20000
    map untrusted to domain = yes 
#    template primary group = "Domain Users"
    template shell = /sbin/nologin
    allow trusted domains = Yes 
#    server signing = mandatory
    server signing = auto
#    client signing = mandatory
    client use spnego = Yes 
    ntlm auth = Yes 
    lanman auth = No
    follow symlinks = yes 
    wide links = yes 
    unix extensions = no
    passdb backend = tdbsam
    preferred master = no
    local master = no
    load printers = no
    printcap name = /etc/printcap
#Share Definitions
[Shared Data]
   available = yes
   comment = Shared Data
   path = /path/to/data
   read only = no
#   writeable = yes
   browseable = yes
   invalid users = root
   create mask = 0660
   directory mask = 0770
   valid users = MYDOMAIN/username1, MYDOMAIN/username2, MYDOMAIN/username3

/etc/nsswitch.conf

asswd:     files winbind
shadow:     files winbind
group:      files winbind

hosts:      files dns wins 

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus

/etc/pam.d/samba

#auth        sufficient    pam_winbind.so use_first_pass
#account     sufficient    pam_winbind.so use_first_pass
#password    sufficient    pam_winbind.so use_first_pass
#session     optional      pam_winbind.so use_first_pass


#@include common-auth
#@include common-account
#@include common-session


auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        sufficient    pam_krb5.so use_first_pass
auth        sufficient    pam_winbind.so use_first_pass
auth        required      pam_deny.so

account     required      pam_unix.so
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
account     sufficient    pam_winbind.so use_first_pass
account     required      pam_permit.so

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok
password    sufficient    pam_krb5.so use_authtok
password    sufficient    pam_winbind.so use_first_pass
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_krb5.so
session     optional      pam_winbind.so use_first_pass

Now join Samba to Active Directory:

net ads join -U Administrator

Map a local group to a domain group:

groupadd fileserverusers
net sam createlocalgroup fileserverusers
net sam addmem fileserverusers "MYDOMAIN\Fileserver Users"
getent group

Note: Normally it is not necessary to use “groupadd” to add the local group but I had to do it this way as a result of the manner in which my Samba setup is all hacked together. The second command ‘net sam createlocalgroup [groupname]‘ is actually supposed to create the local group for you, so you will probably never have to use groupadd.

The group ‘MYDOMAIN\Fileserver Users’ is the name of the AD group you’ll be using to control access to your Samba shares. The local UNIX group (fileserverusers) needs to have the same GID as this group, so after running ‘getent group’, note the GID of the “Fileserver Users” group and then run the following command:

groupmod -g [gid-of-fileserver-users-group]

Make sure you restart winbindd and samba:

/etc/init.d/samba restart
/etc/init.d/winbind restart

That should be all you need to do.

Handy commands

List users:

getent passwd

List group mappings:

net groupmap list

Delete group mappings:

net groupmap delete sid="S-1-5-21-2672132483-2700087972-3760138129-1010"

*Where “sid” is the sid of the group map you want to delete; you can find this by using ‘net groupmap list’

Notable problems/error messages

  • Problem: getent only showing local groups
  • Answer: Make sure that libnss_winbind.so and libnss_winbind.so.2 are linked properly (see the first portion of this post)

Zimbra Notes

This is going to be an ongoing post where I list useful commands that I happen across while managing various Zimbra installations. This is mainly for my own sanity but it has the added benefit of possibly being able to help out someone else. Enjoy!

Increasing the Maximum Allowable Attachment Size

By default, this setting is low. Nowadays it’s acceptable to send attachments larger than 10MB (but not obscenely larger). I don’t like it and I discourage my users from sending large attachments via e-mail but if you feel the need to loosen up this restriction, here are the commands to do that:

su -l zimbra
zmprov ms `zmhostname` zimbraFileUploadMaxSize 20971520
zmprov mcf zimbraFileUploadMaxSize 20971520
zmprov ms `zmhostname` zimbraMailContentMaxSize 20971520
zmprov mcf zimbraMailContentMaxSize 20971520
zmprov mcf zimbraMtaMaxMessageSize 20971520
zmmtactl restart

20971520 = 20MB in bytes.

Disabling the Spam Filter

Sometimes it might be desirable to disable spam filtering across an entire domain or COS. For example, if you pay a 3rd party service to do your spam filtering for you.

zmprov md domain.tld +amavisBannedFilesLover TRUE
zmprov md domain.tld +amavisSpamLover TRUE

The first command turns off all filetype filtering for the domain “domain.tld” while the second turns off all spam filtering. If you wanted to do this on a per-account basis, you’d do this:

zmprov ma user@domain.tld +amavisBannedFilesLover TRUE
zmprov ma user@domain.tld +amavisSpamLover TRUE

“ma” stands for “manage account” and “md” stands for “manage domain”. This is used to specify which type of object you are editing/managing. To reverse these changes you would just change the “+” to a “-” in the previous commands or change the “TRUE” to “FALSE”. My understanding is that this:

zmprov ma user@domain.tld -amavisBannedFilesLover TRUE
zmprov ma user@domain.tld -amavisSpamLover TRUE

Accomplishes the same exact thing that this does:

zmprov ma user@domain.tld +amavisBannedFilesLover FALSE
zmprov ma user@domain.tld +amavisSpamLover FALSE

(This is an assumption, someone please correct me if I’m wrong.)

Now, it’s also possible to completely disable spam and virus filtering, here’s how to do it:

zmprov -l ms `zmhostname` -zimbraServiceEnabled antivirus
zmprov -l ms `zmhostname` -zimbraServiceEnabled antispam

However, if you do this, you will end up with an ugly “***UNCHECKED***” tag inserted into the subject line of every e-mail. To get rid of that you’ll need to edit /opt/zimbra/amavisd/sbin/amavisd and change the following value:

$undecipherable_subject_tag = '***UNCHECKED*** ';

to:

$undecipherable_subject_tag = '';

And then restart Zimbra:

/etc/init.d/zimbra restart

Archiving/exporting/importing a user’s inbox

This is handy if you want to move a user from one server to another, or if you need to export and archive the mailbox of a user who no longer exists.

zmmailbox -z -m user@domain.tld getRestURL "//?fmt=tgz" > /tmp/user_inbox.tar.gz

Then, to import to another server:

zmmailbox -s -m user@domain.tld postRestURL "//?fmt=tgz&resolve=reset" /tmp/user_inbox.tar.gz

Further Reading:

What a n00b! | Zimbra junk mail options you didn’t know existed

Zimbra Forums » [SOLVED] ***unchecked***

Zimbra Wiki » Improving Anti-Spam System

Zimbra Account Export / Import from Command Line

Kensington Train Station / Nothing But Blue

This might be old news to some of you but I didn’t want to write a post about this until the book was officially announced. A while back I got an e-mail from a designer Susanna Vagt at Houghton Mifflin asking if I’d be interested in letting them use one of my photographs for the cover of a new book due to come out in May 2013. Of course I was interested :-)

Anyway, here’s where you can find the book; it’s titled “Nothing But Blue” by Lisa Jahn-Clough.

References

Original Photograph
Book
Book Cover (large)