Thursday, August 20, 2015

How To Install Axigen Mail Server on Windows server

step1==>DOWNLOAD APP
you need primary domain :Active Directory , DNS (AAA,MX)
***if you setup AXIGEN on internet :ip static DNS  ,ACD , FIREWALL recommended(iptables)
***you can use dynamic ip for AXIGEN server but use DDNS 

step2==>





TYPE: http://host:9000
USER:admin
PASS:admin password (you typed )
SAMPlE:





GOOD LUCK 




Wednesday, August 19, 2015

How To Prevent DDOS Attack By PHP




According the PHP part of the question;
Although I don't rely on PHP for this, it could be implemented but needs to consider all these
possiblities or more;

Attacker may change IP for each request
Attacker may pass parameter(s) to URI that target site doesn't care these parameter(s)
Attacker may restart the session before expiry ...
Simple pseudo;

<?php                                                                        
// Assuming session is already started                      
$uri = md5($_SERVER['REQUEST_URI']);          
$exp = 3; // 3 seconds                                              
$hash = $uri .'|'. time();                                            
if (!isset($_SESSION['ddos'])) {                              
    $_SESSION['ddos'] = $hash;                              
                                                                                   
}                                                                              
                                                                                   
list($_uri, $_exp) = explode('|', $_SESSION['ddos']);
if ($_uri == $uri && time() - $_exp < $exp) {
    header('HTTP/1.1 503 Service Unavailable');
    // die('Easy!');
    die;
}

// Save last request
$_SESSION['ddos'] = $hash;
?>

BY qeremy
SEE MORE

Tuesday, August 11, 2015

Allow Sendmail or Postfix Traffic



#iptables -A INPUT -i eth0 -p tcp --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT
#iptables -A OUTPUT -o eth0 -p tcp --sport 25 -m state --state ESTABLISHED -j ACCEPT      


How to define a static route for an external IP address on iptables

I'm putting a new router on our network to help manage our private network connections and to better control routing to the outside. I've decided to simplify this question by removing references to a second private network on our router (but please be aware that there are reasons for this question so the answer is not to leave the old router the default gateway).

I have the following routing in my iptables on our router:



# Allow established connections, and those !not! coming from the public interface
# eth0 = public interface
# eth1 = private interface #1 (129.2.2.0/25)
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW ! -i eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow outgoing connections from the private interface
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT

# Masquerade (NAT)
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# Don't forward any other traffic from the public to the private
iptables -A FORWARD -i eth0 -o eth1 -j REJECT

This configuration means that users will be forwarded through a modem/router that has a public address - this is all well and good for most purposes, and in the main it doesn't matter that all computers are hidden behind the one public IP.

However, some users need to be able to access a proxy at 192.111.222.111:8080 - and the proxy needs to identify this traffic as coming through a gateway at 129.2.2.126 (the old router) - it won't respond otherwise.

I tried adding a static route on our router with:


route add -host 192.111.222.111 gw 129.2.2.126 dev eth1

I can successfully ping 192.111.222.111 from the router. When I trace the route, it lists the 129.2.2.126 gateway, but I just get * on each of the following hops (I think this makes sense since this is just a web-proxy and requires authentication).

When I try to ping this address from a host on the 129.2.2.0/25 network it fails.

Should I do this in the iptables chain instead? How would I configure this routing?


Here is the interfaces configuration for the router:


auto eth0
iface eth0 inet static
    address     150.1.2.2
    netmask     255.255.255.248
    gateway     150.2.2.1

auto eth1
iface eth1 inet static
    address     129.2.2.125
    netmask     255.255.255.128
And here is the routing table (without my static route added):

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         eth1202.sa.adsl 0.0.0.0         UG    100    0        0 eth0
localnet        *               255.255.255.0   U     0      0        0 eth1
129.2.2.0       *               255.255.255.128 U     0      0        0 eth1


To restate - I want traffic from 129.2.2.7 (for example) to now route through our router (129.2.2.125). But this router needs to then forward 8080 requests with the destination of 192.111.222.111 - which is somewhere the other side of the old router (129.2.2.126 - which is not manageable by us).

SEE MORE

5 ways to overcome appetite

1. Eat breakfast

We often hear breakfast is the most important meal of the day because it provides us with the energy and nutrients needed to improve our concentration at home, work, or school. Breakfast is also important in helping us maintain a healthy body weight and stops us from binge eating on snack foods high in fat and sugar long before it’s time for lunch. A 2013 study found adults who skip breakfast tend to have more body weight, hypertension, insulin resistance, and elevated fasting lipid concentrations. This leaves people prone to overeating later in the day and increases their risk of

developing obesity-related diseases.

2. Snack on Healthy Foods

When the uncontrollable hunger pangs begin to set in, it’s important to consume healthy snacks that can help us avoid food cravings. Consuming healthy snacks like “fruits, vegetables, lean proteins (e.g. chicken breast, fish) are great, because they contain lots of vitamins, minerals, and other nutrients that our body can use in a healthy way,” said Dr. Lindsey Hoskins, a psychologist in Bethesda, Md., to Medical Daily in an email. She suggests replacing sugary drinks like juices and diet coke with water because it's a great way to feel full without consuming as many calories.

The more we eat addictive foods such as sugars, salts, fats, and carbohydrates, the more we want them. Consuming healthy fats can decrease sugars slowly to help avoid major cravings and prevent the body from experiencing rapid fluctuations in blood sugar levels. Hoskins believes if we train ourselves to enjoy healthier foods that aren’t as addictive, this can be an essential tool to cut down on binge eating.

3. Use Smaller Plates

While this may be playing tricks on your mind, it’s for a good cause — your health. Eating on smaller plates can help curb your appetite because, quite frankly, we all know the larger the plate, the more likely we are to overeat. A 2006 study found children and adults serve themselves based on a size-contrast illusion, meaning they serve and consume more cereal when given a larger plate compared to those given a smaller plate. Plate and spoon size on the serving and consumption of ice cream was also evaluated.

At home, portions are a key factor for stopping the family from overeating at family dinners. “Plate accordingly... don't make dinner 'a la carte’” Dr. Dale Fernandez, a chiropractor at the Back to Wellness Center in Los Angeles, Calif., told Medical Daily in an email. Rather, Fernandez said, place food items on everyone’s plates in the kitchen in appropriate portions. All the serving dishes should be kept in the kitchen and not on the table, as many of us do. “Seconds are never necessary,” he said.

4. Exercise

Physical activity can make us work up a sweat and even reduce our reaction to food signals post workout. Exercise is a great way to elevate our mood, help get our mind off food, and alleviate any stress. A 2012 study found exercise significantly reduced neuronal response to food, which could be detected in different areas of the brain. It also led to a significant decrease in activation in the parts of the brain that are associated with food craving, reducing incentive motivation, and reduced anticipation for food. Reduce your hunger pangs by getting a moderate amount of physical activity every day.

5. Mindful Eating

Overeating is a struggle that can be overcome with mindful eating techniques. Mindful eating includes pacing ourselves at meals and avoiding doing something distracting while we eat, such as sitting in front of the television or working on the computer. These distractions will interfere with our ability to perceive portion size, which can actually cause us to overeat. However, Kristen Smith, dietician in Atlanta, Ga., told Medical Daily in an email, those who eat fast and hardly chew their food don’t allow for the brain to recognize the flavor, nor give the food enough time to reach the stomach, and send a signal that it’s full. “I recommend to spend at least 20 minutes per meal and chew food to an applesauce consistency prior to swallowing,” Smith said.


SEE MORE