multiple pppoe with proxy server
Im trying to use a Raspbarry pi to to build a proxy server with multiple
pppoe connections. so, i can let my spider easier to change different ip
through proxy server and using different ip address.
Device are : one pppoe modem, one raspbarry pi, one laptop
And here is what i did :
1. build up two pppoe connections by using Raspbarry pi (different ip but
same gateway)
2. setup load balance to make sure two pppoe connect is functional
command :
ip route replace default scope global nexthop dev ppp0 weight 1
nexthop dev ppp1 weight 1
3. setup 2 ip alias
command :
ip address add 192.168.55.11/24 brd + dev eth0 label eth0:0
ip address add 192.168.55.12/24 brd + dev eth0 label eth0:1
4. setup squid server like this :
acl ip1 myip 192.168.55.11
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp0) ip1
acl ip2 myip 192.168.55.12
tcp_outgoing_address xxx.xxx.xxx.xxx (the real ip i get from ppp1) ip2
5. use other computer to connect it through lan ip and make proxy change
real ip for me
And the question is i found out that the network package will lost by
random, and squid log will show tcp_miss/200 or tcp_miss/503 errors.
Can anyone please give me a direction on this issues or any suggestion to
make this easier ? Thank you
Tuesday, 1 October 2013
Foreman Unattended Installation
Foreman Unattended Installation
I am currently hard coding a preseed configuration to install foreman on a
new machine together with Ubuntu 12.04. The intention is to be able to
reproducably create a foreman installation which deploys openstack on
brand new machines via PXE.
I think I can achieve this with my manual hacking, but to me it seems to
be overkill. Is there a possibility for foreman to provision itself? Can a
"temporary" foreman create an install image and provision itself?
I am currently hard coding a preseed configuration to install foreman on a
new machine together with Ubuntu 12.04. The intention is to be able to
reproducably create a foreman installation which deploys openstack on
brand new machines via PXE.
I think I can achieve this with my manual hacking, but to me it seems to
be overkill. Is there a possibility for foreman to provision itself? Can a
"temporary" foreman create an install image and provision itself?
Monday, 30 September 2013
Icons on the desktop do not state the name of the file/directory?
Icons on the desktop do not state the name of the file/directory?
How do I fix the desktop icon which don't show the file/directory names
they are associated with and has an icon size which is to small to be on
the desktop?
I scanned through unity-tweak-tool but found no option option relevant to
this.
Ubuntu 13.04 it is.
Screenshot:
How do I fix the desktop icon which don't show the file/directory names
they are associated with and has an icon size which is to small to be on
the desktop?
I scanned through unity-tweak-tool but found no option option relevant to
this.
Ubuntu 13.04 it is.
Screenshot:
Does case carry into an appositive=?iso-8859-1?Q?=3F_=96_german.stackexchange.com?=
Does case carry into an appositive? – german.stackexchange.com
I'll ask this question in English, because I'm not sure I could articulate
it well enough in German. So this question too is about my essay. The
relevant part of the original sentence was «...die …
I'll ask this question in English, because I'm not sure I could articulate
it well enough in German. So this question too is about my essay. The
relevant part of the original sentence was «...die …
Placing numeric value into an Array range
Placing numeric value into an Array range
I have an array that has numeric values stored. like this:
$ranges = array(1=> '33', 2=> '66', 3=> '99');
i have a variable called $result that gives me a dynamic value between 0-100.
for example:
If $result is equal to or greater than 33 AND less than 66, then the
returned key should be 1
If $result is equal to or greater than 66 AND less than 99, then the
returned key should be 2
If $result is equal to or greater than 99, then the returned key should be 3
Any ideas on how this can be achieved?
I have an array that has numeric values stored. like this:
$ranges = array(1=> '33', 2=> '66', 3=> '99');
i have a variable called $result that gives me a dynamic value between 0-100.
for example:
If $result is equal to or greater than 33 AND less than 66, then the
returned key should be 1
If $result is equal to or greater than 66 AND less than 99, then the
returned key should be 2
If $result is equal to or greater than 99, then the returned key should be 3
Any ideas on how this can be achieved?
How to use profilling for Mac OS X Applications?
How to use profilling for Mac OS X Applications?
I am looking forward to do some profiling to find cpu usage of my
application. Also in which part of the code its taking more cpu time. I am
fresh to the profiling. I need help regarding this,
I am looking forward to do some profiling to find cpu usage of my
application. Also in which part of the code its taking more cpu time. I am
fresh to the profiling. I need help regarding this,
Sunday, 29 September 2013
Jquery Form plugin : dynamic target/multiple forms
Jquery Form plugin : dynamic target/multiple forms
I am using the form plugin from http://malsup.com/jquery/form/
I am trying to set the target div to be updated dynamically. At the moment
this is what the code looks like but instead I want to pas a different
value for target through a hidden form field, so the #target2 can be
dynamically changed to #target20, #target40 etc. Thanks.
<script type="text/javascript">
$(document).ready(function() {
$('.htmlForm').ajaxForm({
target: '#target2',
success: function() {
$('#target2').fadeIn('slow');
}
});
});
</script>
and the form html
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and the div to be updated
<div id="ztest"></div>
another form
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest2" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and another div to be updated
<div id="ztest2"></div>
I am using the form plugin from http://malsup.com/jquery/form/
I am trying to set the target div to be updated dynamically. At the moment
this is what the code looks like but instead I want to pas a different
value for target through a hidden form field, so the #target2 can be
dynamically changed to #target20, #target40 etc. Thanks.
<script type="text/javascript">
$(document).ready(function() {
$('.htmlForm').ajaxForm({
target: '#target2',
success: function() {
$('#target2').fadeIn('slow');
}
});
});
</script>
and the form html
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and the div to be updated
<div id="ztest"></div>
another form
<form class="htmlForm" action="ajax-data.php" method="post">
<input type="hidden" name="target" value="ztest2" />
Message: <input type="text" name="message" value="Hello HTML" />
<input type="submit" value="Echo as HTML" />
</form>
and another div to be updated
<div id="ztest2"></div>
Subscribe to:
Posts (Atom)