You are going to want to modify the following two lines in the script
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
Make one script with --dport 18441 --sport 18441 and another script with --dport 18442 and --sport 18442
I do want to say though, as far as I understand it's not more efficient to be running two instances of bitcoind from one IP. You would just basically be splitting connections between the two instances when you could be running 1 instance that would have the sum of the connections in your current setup. Basically what you have right now:
Instance1: 20 connections
Instance2: 20 connections
with a single instance you would have:
SingleInstance: 40 connections
I am specifically connecting only two nodes 18441 and 18442 with each other and not with the outer network of bitcoind. – bawejakunal – 2015-10-31T05:47:39.160