February 23, 2011
A while back I built an e-mail server for a company. Using CentOS, Postfix, Courier and MySQL, it ended up being very functional, supporting SMTP, POP3, IMAP, SSL, Webmail and more. Outlook is the primary desktop client used by the company, iPhones and Androids are used, and I also used Roundcube for webmail access. The majority of the configuration was done using a guide by Michael Bowe, found here, with a few tweaks as needed. One item missing from his guide was a good tool to manage e-mail boxes, so I created a web-based tool in php. In case his website ever goes down, I’m attaching his original guide and I’m also attaching my web management tool.
PHP Web Management Tool
Original Guide by Michael Bowe
Filed under: Linux |
Comments Off
February 21, 2011
Anyone using iSCSI targets in Linux may have discovered what I have - restarting iscsi services causes a disconnect of all the attached initiators. This is true with the scsi-target-utils or the iscsitarget (IET) packages. I typically use an LVM logical volume for iSCSI LUN’s. Occasionally I need to resize them, but the client doesn’t see the new size until a restart. I discovered a better way to do this, which doesn’t disconnect any initiator clients in the process. You need to use the ietadm tool (or tgtadm) and manually delete the LUN and add it back in. Don’t worry - the delete command doesn’t actually delete the block device or any data, just deletes it from the target’s memory. After resizing the LUN with lvextend, determine the tid and lun you need to update:
tgtadm --op show --mode target
or using IET:
cat /proc/net/iet/volume
WARNING: you should stop all IO if possible before continuing. With heavy IO, you can be sure the LUN won’t re-attach, and it may not even detach. I’ve had tgtd crash on me. On SQL, make sure DB’s are not in use. On Hyper-V, just pause or shut down all the VM’s - I’ve never had it work otherwise. If the LUN doesn’t re-attach, use iSCSI Initiator tool in Windows and add a new connection to attach it. Moving on…
Then, to update the LUN with the new size, delete it and add it back using the information above, like this:
tgtadm --mode logicalunit --op delete --tid=2 --lun=1 && tgtadm --mode logicalunit --op new --tid=2 --lun=1 --backing-store=/dev/vg01/vol1
or with IET:
ietadm --op delete --tid=2 --lun=1 && ietadm --op new --tid=2 --lun=1 --params Path=/dev/vg01/vol1,Type=blockio
Remember, if you make any actual changes to the LUN’s besides resizing, you’ll need to update ietd.conf or targets.conf so the changes are remembered on a restart.
Filed under: Linux, Microsoft, Windows |
Comments Off
February 3, 2011
Using a Remote Desktop Gateway (RDP over HTTPS) for Remote Desktop Services (RDS, or formerly known as Terminal Services) works great, except the initial connection time can be long, even up to 30-45 seconds. I discovered that this is because the RDP client attempts to connect over port 3389 first. If your firewall is designed to ignore connection attempts then the RDP client will need to time-out before trying HTTPS. This causes the delay. To speed it up, configure your firewall to actively deny traffic on port 3389, or send a RST (Reset Flag) packet. For example, on a Cisco PIX firewall, it will look something like this:
access-list outside_in deny tcp any host my.public.ip.address eq 3389
Can’t get the above working on an ASA, though.
With iptables, this:
iptables -A FORWARD -i $PUB_IF -p tcp --dport 3389 -j REJECT --reject-with tcp-reset
Filed under: Microsoft, Network, Windows |
Comments Off