Firewall rules for Synergy in iptables

For a while I’ve been turning off iptables to let my secondary machine connect as synergy client to let me use one keyboard and mouse across both machines.  Finally today I decided to set up the rules properly to do it, so here’s how:

Create a new rule file in the iptables chain directory for incoming rules:

sudo vi /etc/iptables.d/filter/INPUT/53-custom-synergys.rule

with the following lines in it:

# Allows incoming flows for Synergy.
-A INPUT -p tcp -m tcp --dport 24800 -j ACCEPT
-A INPUT -p udp -m udp --dport 24800 -j ACCEPT

Restart iptables for the rules to take effect

sudo /etc/init.d/iptables restart

But God came to Abimilech in a dream

Abraham told Abimelech Sarah was his sister, so he’d taken her to be his wife. Before he does anything, God comes to him in a dream to warn him.

God keeps Abimelech from sinning thus resulting in him bringing fear of God to him and his people and providing for Abraham and Sarah.

Reaction: Arose early to obey

“You are a dead man…for the penalty of your sin is death”

God comes and prevents the sin from increasing – he protects Sarah where Abraham should have done, but more than that – Abimelech’s nation now fears God. For God always recieves the glory.

Abimelech is honest to God and God acknowledges Abimelech’s honesty and integrity, but makes it clear it is His doing – “I prevented you from sinning”

Lead me not to sin against you and save me from my faults becoming greater sin. Amen

If we were to talk less and pray more, things would be better than they are in the world

John Owen, The Holy Spirit: His Gifts and Power [Christian Focus, 2004], 362

But God remembered Noah

He blotted out every living thing that was on the face of the ground, man and animals and creeping things and birds of the heavens. They were blotted out from the earth. Only Noah was left, and those who were with him in the ark. And the waters prevailed on the earth 150 days.

But God remembered Noah and all the beasts and all the livestock that were with him in the ark. And God made a wind blow over the earth, and the waters subsided.

(Genesis 7:23-8:1 ESV)

Here we see the earth covered in water, every living thing blotted out except in the midst of the water there is a big box floating with a family and lots of animals in it. They’ve been in this box for what must have seemed like ages and just have with them the food God told them to bring. I wonder if they were beginning to think God had forgotten them? God could have let them perish as the rest of mankind had but no – God remembers Noah as he has promised him and makes the waters subside revealing his creation once more.

We are all at the mercy of God – we are his creation and he can do with us what he will. God chose to save Noah and his family in order to restart the human race, Noah trusted God and did what he was told – resulting in his salvation whilst all else was destroyed.

Putting it simply, everything was headed for destruction, but God remembered Noah and rescued him.

What difference will it make remembering that we are all at God’s mercy to do what he will with?

Will you trust God in the midst of destruction?

God won’t forget us even if his promises seem a long time coming and it feels as if he has.

MySQL: From multi-master to circular replication

  • Disable anything that will write to the database
  • Update the my.cnf files for all servers to support circular replication, by adding log-slave-updates and ensuring you have unique server ids and the auto increment values are suitable. Then restart mysql to pick up the config changes.
  • Ensure your existing replication is up-to-date using:
    SHOW SLAVE STATUS
  • Stop replication on both existing servers using
    STOP SLAVE
  • Create a backup of the database from the server that will be just before your new server in the circle using:
    mysqldump --master-data=1 -a -c -Q {db} >  {filename} 
  • Add the userids for replication to your new server.
  • Transfer the backup to your new server and import it.  
  • Change the master config on the new server to point to the server before it in the circle, using the values from the database backup (head -30 {filename} should get you them) and start the slave using:
    STOP SLAVE;
    CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.00001', MASTER_LOG_POS=764,MASTER_HOST='{hostname}';
    START SLAVE;
  • Update the master config on the next server in the circle to point to your new server using the command above, taking the values for the log file and position from your new server using:
    SHOW MASTER STATUS

Distraction free writing – Artsy Editor or WordPress 3.2

For a while I’ve been following the updates on a new plugin for WordPress – Artsy Editor which gives you a completely clean page in which to write your post with easy access to the formatting options through a popup which appears intelligently when you select text, as seen in the image above. You can also drag an image into the editor to upload and insert it where you are typing. All in all it works really smoothly.

In the new release of WordPress 3.2 there is also a similar full browser editing feature included called distraction-free mode. It works pretty well and but it doesn’t have drag and drop uploading and it’s formatting bar feels more cluttered. While you are writing both options provide you with a completely clear page in your browser when you move your mouse with the distraction-free editor you get a full toolbar appear, where as in Artsy Editor, the interface stays very minimal until you select the text or click on one of the controls. The WordPress distraction-free view pulls in the editor css specified by your theme for the editing section in the page, where as Artsy Editor allows you to choose a background and font from a list of choices – which works well as the whole page takes on the background colour not just the editing section as the wordpress view does. The other major advantage in Artsy Editor for me is in the ease of publishing (I’m very prone to leave drafts sitting around for months) – when you move the mouse from editing, the one button it shows is to Publish (you can hover over it to save draft, preview, view HTML or send to trash).

The distraction-free editor isn’t that far behind and I can see it improving in the coming releases, but for me I prefer the streamlined interface of Artsy Editor, particularly it’s drag and drop image handling.  Try out the uncluttered interface of Artsy Editor for yourself at the website!

From around the web…

Here’s a few articles I’ve read recently that are helpful and challenging:

In Reminders Are More Effective Than Rebukes, Tullian Tchividjian reminds us of the need as Christians to regularly remind each other of who we are in Christ, rather than focusing on our sin and that we re-focus on Jesus for “because of Christ’s work on your behalf, God does not dwell on your sin the way you do”

A prayer for strength for one of those days: Dear Lord Jesus, it’s looking like one of THOSE days … Am I whining? Yes I am, Lord, but I’m bringing my bad attitude and my very busy day to you.

10 Things That Keep Us From Mission looks to be a challenging series on the Resurgence and well worth following.

In Speaking with Contempt, Tim Keller warns against the natural temptation to respond to criticism with self-righteous contempt towards the critic.