One of the best things about lebanon and especially the castle in Tripoli is the lack of red tape concerning places you can go in historical sites. The only problem is with this freedom is that most of the ruins in the country have been left pretty much as they are. On some parts there are railings but on top of the castle walls for instance there is nothing to stop you falling over the edge.
So my advice would be, enjoy the lack of modernisation to take some great pictures but just be careful!
Tripoli is predominately made up of Muslims, so women should cover their legs with long trousers/skirt and not bear their shoulders. Guys shouldn't wear shorts which are too short.
If you are heading for Syria, make sure you have a visa before arriving in Lebanon, as there is no Syrian Embassy in Beirut and Syrian visas can't be obtained on the border.