Monthly Archive: April 2013

How to set static ip on ubuntu 0

How to set static ip on ubuntu

vim /etc/network/interfaces

dynamic:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Static:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8 8.8.4.4
Zimbra 8 restrict sending to external domains 0

Zimbra 8 restrict sending to external domains

vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders

NExt

vim /opt/zimbra/conf/zmconfigd.cf

Search for “SECTION mta” and append directly under

    POSTCONF    smtpd_restriction_classes      local_only
    POSTCONF    local_only      FILE  postfix_check_recipient_access.cf

so it should now look like:

SECTION mta DEPENDS amavis
    POSTCONF    smtpd_restriction_classes      local_only
    POSTCONF    local_only      FILE  postfix_check_recipient_access.cf

Next

vim /opt/zimbra/conf/postfix_check_recipient_access.cf
check_recipient_access hash:/opt/zimbra/postfix/conf/local_domains, reject
vim /opt/zimbra/postfix/conf/restricted_senders
user@mydomain.com            local_only
entiredomaintoblock.com      local_only

Create file for allowed domains

vim  /opt/zimbra/postfix/conf/local_domains
alloweddomain1.com      OK 
alloweddomain2.com      OK

Run the following commands to Restart Postfix mail system and stuff

postmap /opt/zimbra/postfix/conf/restricted_senders
postmap /opt/zimbra/postfix/conf/local_domains
zmmtactl stop 
zmmtactl start
DMZ/HotLAN Traffic to LAN 0

DMZ/HotLAN Traffic to LAN

What we are essentially going to do here is to punch a hole through our proxy using iptables

The basic syntax for letting an entire DMZ network use a particular port on LAN is as follows..

iptables -I FORWARD -s DMZNetwork/24 -d LANNetwork/24 -p tcp --dport 80 -j ACCEPT

This will let the DMZ network communicate to the LAN network but only via port 80 (in the case where you have an internal server or multiple internal servers you wish everyone to access).

To let only one ip through (for instance if you want your mail server to authenticate with an active directory or ldap/ldaps server

iptables -I FORWARD -s 192.168.1.1 -d 10.0.10.1 -p tcp --dport 636 -j ACCEPT

Where 192.168.1.1 is the machine on the hotlan/dmz and 10.0.10.1 is our Active Directory/Ldaps server..

Note: the above example is set for ldaps, if you prefer use ldap (unencrypted, not recommended) change to port 389

Installing Django 1.5.1 with python 2.7.4 on Bluehost 3

Installing Django 1.5.1 with python 2.7.4 on Bluehost

First SSH Into your account (using putty, or terminal if you are on linux) where we will start by moving to our home directory (~) and creating a directory for the latest python.

cd ~
mkdir python27
wget http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz
tar xzvf Python-2.7.4.tgz
cd Python-2.7.4
./configure -prefix=/homeX/your_username/python27 --enable-unicode=ucs4
make
make install

We then add this python directory to our PATH environment variable and load it (more…)