, , ,

IP ROTATION VIA IP TABLES

First we need creating Interface aliases for your public IPs.


Let's say you have 5 ips


#ifup eth0:1
#ifup eth0:2
#ifup eth0:3
#ifup eth0:4




Now the iptables part.make sure your iptables support for statistic match module.


# iptables -m statistic -h
......
......
......
statistic match options:
--mode mode Match mode (random, nth)
random mode:
--probability p Probability
nth mode:
--every n Match every nth packet
--packet p Initial counter value (0 <= p <= n-1, default 0)
Next continue with iptables rule for rotating source IP addresses.


# iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 202.XXX.XX.2
# iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 202.XXX.XX.3
# iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 202.XXX.XX.4
# iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 202.XXX.XX.5
# iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o eth0 -m statistic --mode nth --every 5 -j SNAT --to-source 202.XXX.XX.6
done
Continue reading IP ROTATION VIA IP TABLES
,

Solved: Error compiling httpd-2.2.23: byterange_filter.c:(.text+0x12c1): undefined reference to `apr_array_clear’

modules/http/.libs/libmod_http.a(byterange_filter.o): In function `ap_set_byterange':
byterange_filter.c:(.text+0x12c1): undefined reference to `apr_array_clear’
collect2: ld returned 1 exit status
Solution: Add this to the configure command:
--with-included-apr
with compliments and kind regards to Stefan for providing this solution
Continue reading Solved: Error compiling httpd-2.2.23: byterange_filter.c:(.text+0x12c1): undefined reference to `apr_array_clear’