Skip to main content

IP rotation

Comments

11 comments

  • cPanelMichael
    Hello :) Could you elaborate on the purpose of alternating your IP address? For instance, do you mean you want to send from a different IP address every two hours? Is your server's IP becoming blocked by spam lists? Thank you.
    0
  • imran_k
    Hello, Yes I want to send mails from different IP Address every hours. I want to maintain reputation of all the IP address which are in the servers. Thanks, Imran Khan.
    0
  • cPanelMichael
    I'm not sure I understand how changing the IP addresses is going to make a difference. If SPAM is sent out, it could still result in an IP address getting added to a blacklist. However, by changing the IP address, you ensure the domain name that did not send out the SPAM is blacklisted instead of the domain name that sent it out. I recommend taking steps to prevent email abuse on your server. The following document is a good place to start: cPanel - Prevent Email Abuse Thank you.
    0
  • imran_k
    Hello, Yes I want to send mails from different IP Address every hours. How to do this? Thanks, Imran Khan.
    0
  • Infopro
    [quote="imran_k, post: 1607201">... Thanks, Imran Khan.
    Did you lose the login details to your other forum account? If yes, I can help. :)
    0
  • cPanelMichael
    [quote="imran_k, post: 1607201">Yes I want to send mails from different IP Address every hours. How to do this?
    There are no native features that would allow you to rotate the IP addresses used for sending out email. The options included with cPanel/WHM only allow for the permanent change of the IP addresses used for sending. You would have to develop a script that makes the changes listed here automatically. That being said, please see my previous response on this thread, as it seems like this type of setup might not be a good idea. Thank you.
    0
  • vanessa
    I wrote this a while back for someone else, maybe it can help you. It's intended to run via cron. Just put your IPs in /etc/mailipaddrpool, one on each line. #!/bin/bash # Exim Outgoing IP address rotator # The cPanel Admin 5/9/11 # Files: /etc/mailipaddrpool : list of IP addresses to use for mail ipfile=/etc/mailipaddrpool curip=$(grep "*:" /etc/mailips |awk '{print $2}') if [[ "$curip" == "" ]] || ! grep $curip $ipfile >/dev/null ; then curip=$(tail -1 $ipfile) fi nextipct=$(cat $ipfile |grep -A 1 $curip |wc -l) if [ "$nextipct" == "1" ];then nextip=$(head -1 $ipfile) else nextip=$(cat $ipfile |grep -A 1 $curip | tail -1) fi sed '/*:/d' -i /etc/mailips sed '/^$/d' -i /etc/mailips echo "*: $nextip" >> /etc/mailips
    It's not the prettiest, but it does the job. To add on to cPanelMichael's point, you may want to add measures to limit how many rotations are done within a certain period of time. If someone is spamming from your server and you're changing the IP, every IP you change to will get blacklisted.
    0
  • TeqExperts
    I have found script do Ip rotation but, need someone explain step by step cause i need it too /http://jackal777.wordpress.com/2012/08/26/script-to-rotate-ip-of-a-cpanel-domain/ Script to rotate IP of a cpanel domain
    0
  • slideloft
    this is what i found from the link should i add like this # Files: /etc/mailipaddrpool : 1.0.02,1.0.03,1.0.0.4 Assuming the ip are 1.0.02,1.0.03,1.0.0.4 #!/bin/bash # Exim Outgoing IP address rotator # The cPanel Admin 5/9/11 # Files: /etc/mailipaddrpool : list of IP addresses to use for mail ipfile=/etc/mailipaddrpool curip=$(grep "*:" /etc/mailips |awk '{print $2}') if [[ "$curip" == "" ]] || ! grep $curip $ipfile >/dev/null ; then curip=$(tail -1 $ipfile) fi nextipct=$(cat $ipfile |grep -A 1 $curip |wc -l) if [ "$nextipct" == "1" ];then nextip=$(head -1 $ipfile) else nextip=$(cat $ipfile |grep -A 1 $curip | tail -1) fi sed '/*:/d' -i /etc/mailips sed '/^$/d' -i /etc/mailips echo "*: $nextip" >> /etc/mailips
    0
  • cPanelMichael
    Hello, Yes, however ensure the IP addresses are on separate lines in the /etc/mailipaddrpool file. EX: 1.1.1.1 2.2.2.2 3.3.3.3
    Thank you.
    -1
  • 24x7ss
    Hello, Or you can simply create a bash script to replace the IP for *: in /etc/mailips and run it every 2 hr in root cron.
    0

Please sign in to leave a comment.