June 11, 2007
No Comments
I’ve been using LaTeX for many years, I should say quickly for the freaks out there that it doesn’t mean I’m into vinyl or other strangeness. LaTeX is a document processing system that creates good quality documents
from text source, no hamsters or chains involved at all.
The standard processors you get with LaTeX are good at converting the source into Postscript or PDF (Acrobat) documents and for most of the time this will do. However there are occasions when you want to have your document output in HTML. In this case you need to have a different processor.
This page is about the various types of LaTeX to HTML converters out there. It is not an exhaustive list but should help other people looking around for converters. The main problem with them all is they are not
maintained that well.
Hyperlatex is the converter I have used the most. It does most jobs quite well and you get reasonable results from it. My major gripes with it is that it is written in Lisp so I cannot extend it (I don’t know Lisp) and that it doesn’t do CSS that well.
Despite those shortcomings, Hyperlatex is a good start for document conversion. Unlike most program on this page, it is actively maintained and keeps up with HTML standards. For example there is work for
Hyperlatex output to be in XHTML.
TTH has put a lot of effort into the formula conversion. Most converters make an image for the formulas while TTH generates HTML for it, giving the formulas a more consistent look in the document rather than looking like they were “pasted in” later.
TTH has a funny license in that (roughly) it is free for non-commercial use only. Depending on where you are going to use it, this may be a problem. You can buy a commercial license of TTF too.
HeVeA is one converter I haven’t used, but will try out soon. It looks like it would get confused by some of my documents, especially anything with nested environments.
The program is written in a language called Objective Caml which I know even less about than Lisp. That means no way of extending it for me.
At first I thought this would be the converter for me. It looks like it converts it pages rather well and it is written in a programming language I understand (Perl).
The main problem with this program is that it has not been maintained for years. A consequence of that is the HTML rendering is a bit old and doesn’t keep up with the latest standards.
Another one I’ve not tried yet. This one does look recently maintained and I will be trying it out.
This converter takes LaTeX as an input and instead of having an output file format of DVI makes it XML. It is written in Perl and was developed with a particular focus on the mathematical equations. To get HTML you use a post-processor.
June 11, 2007
No Comments
Quite often there is discussion about what operating system to use and the pros and cons of each. Of course one aspect that comes up is security, which is definitely a worthwhile goal to have. However the discussion is usually based upon technical points only; Operating system A has this feature, while B has another that is trying to do the same thing, but doesn’t do it quite as well, while C doesn’t have that feature at all.
Technical points are important, but when you get down to the various flavours of Unix, it all rapidly becomes academic. Pretty much any Unix is more secure that any Microsoft Windows. This is because there is the
proper concept of user/uid and process separation not to mention a nice boundary between the application and the OS. This layering helps with security but it also makes updating a lot easier.
Sure, this flavour of Unix may have a certain feature, but does it really do anything worthwhile and
what is the chance of some event happening where the absence of this feature
means the server is hacked, while other similar servers with the feature are
fine. I’ve used Sun Solaris as an example here, let’s face it, there is
pretty much no ongoing new support for any other commercial Unix and
no future.
As a network engineer, security to me as just another aspect of network
management. It is important, but so is keeping the service running free of
faults and up to a certain level of performance. Perhaps some principles of
network management could be used to apply to server security.
An important lesson of network management is that quite a large number of
faults ( some studies have said 50%, some said 70%, we’ll never know the true
number ) can be attributed to a person or process failure, as opposed to
a software or hardware problem as such. Whatever the percentage is, quite
a large amount of security breaches are due to the administrators, for whatever
reason, not running their servers correctly. Therefore, anything that makes
the administrators job easier or the processes simpler makes security better.
An example
Perhaps an example will help. You’re in charge of setting up some servers
and you can choose what goes on them. You’ve narrowed it down to Solaris
or debian GNU/Linux, what to choose?
The first answer should be, if the current operators are far more comfortable
with one over the other and you intend to use the same operators for the new
systems without any additional staff, go with whatever they are used to.
However if there is no strong preference, you then have to look at other things.
How about security patches and testing? Is the setup you’re running going
to be maintained and is it tested correctly?
Running Software – Solaris Style
Sun now has in their more recent versions included a lot more free software,
but it is still not a lot and, well they just have this habit of screwing
it up. I’m not sure why, but they don’t seem capable of compiling something
off, say, sourceforge, without making a mess of it. Top and bash used to
crash, never seen bash crash before I saw it on Solaris. And I won’t even
mention the horror of their apache build.
What happens if you want to run a MTA like postfix? Certainly a lot easier
to run and a lot more features than the standard sendmail. Or you want some
sort of web application that needs certain perl modules? If you’re running
Solaris, you download all the sources, compile and repeat all through the
dependencies. You can get pre-compiled programs from places scattered around
the Internet, but quite often there are library version conflicts.
That hasn’t even got into the problems when package A wants version 4 of
library Z but package B wants version 5 of library Z. Or what happens
if they both want version 4, but then you need to upgrade one of the
packages which needs the newer library?
Running Software – Debian Style
For the Debian user, it is usually a matter of apt-get install <packagename&g
t;.
There are nearly 9,000 packages in the distribution, so whatever you want is
probably there. There are only rare library conflicts; the library versions
are standard across each release and everyone runs the same one. The only
problems are the occasional transitional glitches as one packager is on
the new libraries and the other is still on the old one. Still the
occurrence of this sort of thing is greatly reduced.
All nearly 9,000 packages go through the same QA control and have their
bugs tracked by the same system in the same place. If the person cannot
get a problem fixed, they have the help of at least 800 of their fellow
Debian developers. If you’re having problems with your own version of the
program on Solaris, you’re on your own.
Upgrading a hassle, so it doesn’t happen
Now the problem is that upgrading on most systems is a real pain. The problems
surrounding the slammer and blaster worm on Microsoft servers is a good example.
When the
worm came out, people were saying its propagation was solely due to poor
system maintenance where the lazy administrators did not bother to
properly patch their servers.
Even the OS itself can play up, causing strange and amusing problems to
appear. My wife’s
Windows XP computer switches off when it goes into powersave mode. This
started happening after installing a security patch. I’m not sure what the
power saving code has to do with security, maybe evil hackers across the
internet cannot turn my lights on and off anymore.
While there definitely would be a subset of administrators that did fit
into the category of lazy and indept administrators, there were also
plenty that could not upgrade or fix
their systems. The problem was applying a service pack would break a great
deal of things in some random way. Some people just could not be bothered
or were too scared to upgrade.
It is generally expected that when you upgrade, you will get problems and
these problems need to be risk-managed. It shouldn’t be the usual expectation
for a simple upgrade.
While it is often a good idea, but not essential, to reboot a Debian system,
for most upgrades you just install the upgraded package and that’s the task
finished. There’s no need to stop and start the effected services because
this is generally done for you.
The clear layering of the application and OS and the reasonably clear layering
of the application and library code means that if there is a problem with
one of the layers the upgrade of it will not effect the other layers. This
is why when an application crashes on a Unix server you restart the application
while on a Windows server you reboot it.
June 11, 2007
No Comments
Not many people know it, but the DLink DSL-300 ADSL modem has SNMP management capabilities. And for such a small and cheap network device, its not too bad an implementation of it. Or perhaps I’ve just seen a lot of dead-awful ones to compare objectively. Of course the displaying of the private community in the MIB, which is something the DSL-300 does, is a pretty dumb idea.
I should point out right here that these instructions work for me. They might work for you, or you might just find some easter egg in the modems firmware that turns it into a smoke machine So do any of this stuff at your own risk.
You will have to connect to the modem using a serial port first to find out the IP address and change either your computers or the modems IP address so they are in the same network. Note that this address is not the same as the one your provider gives. And the communities are the very hard to guess public and private for read-only and read-write respectively.
The modem has some of the standard SNMP MIBs that anyone who’s played with SNMP will quickly recognise, such as.
- system information
- interface information including the ifTable
- IP MIB – Packets in out, discards etc
- ip routes
- TCP MIB
- SNMP MIB, which is statistics about the agent itself
- SNMPv2-SMI::mib-2.17.4
All pretty standard stuff you see in pretty much any device. All the good information is always found in the private enterprises part of the MIB, and the DSL-300 is no exception. The problem is that if you ask
DLink about it, they will tell you nothing. The nice thing about DLink is they’re pretty consistent about annoying the hell out of their customers by denying them technical information.
With that rant out of the way, its time to work out for myself what these values are for. I’ve got some worked out but it will take some more time to get it all clear and possibly some will never be worked out, thanks DLink!
All OIDs start with private.enterprises.171.11 There are quite a few gaps so if you know what the missing values mean, drop me a line.
| OID | Type | Description |
| 1.1.1.0 | STRING | Software version eg “R1.14AU” |
| 1.1.2.0 | STRING | PROM firmware version “Ver. 1.00″ |
| 1.1.3.0 | STRING | Hardware version “Rev. 1.00″ |
| 1.1.4.0 | INTEGER | Management Protocols supported: 2=snmp-ip |
| 1.1.5.1 | Table | Table showing what MIBs are supported |
| 1.1.5.1.1.X | INTEGER | - Index of Table |
| 1.1.5.1.2.X | STRING | - Name of MIB supported eg “DSL504-MIB”, “RFC1213-MIB” |
| 1.1.5.1.3.X | INTEGER | - Version of MIB supported |
| 1.1.5.1.4.X | INTEGER | - Type of MIB |
| 30.1.1.0 | INTEGER | Bridge/Router: 1=PPPoA-Router, 2=PPPoA-Bridge, 3=RFC1483-Router, 4=RFC1483-Bridge |
| 30.1.2.0 | INTEGER | Config Save 1 |
| 30.1.3.0 | INTEGER | System Restart 1 |
| 30.1.4.0 | INTEGER | ?? 1 |
| 30.2.1.0 | INTEGER | ADSL Driver Mode: 0=link down, 1=T1-413, 2=G-lite, 3=G-DMT |
| 30.2.2.0 | INTEGER | Upstream rate in kbps |
| 30.2.3.0 | INTEGER | Downstream rate in kbps |
| 30.2.4.0 | STRING | Device driver version |
| 30.2.5.0 | INTEGER | ADSL Link Status: 0=Idle, 1=Connecting, 2=Connected |
| 30.2.6.0 | INTEGER | Driver Path: 0=Fast, 1=Interleave |
| 30.2.7.0 | INTEGER | Near End FEC line error count |
| 30.2.8.0 | INTEGER | Far End FEC line error count |
| 30.2.9.0 | INTEGER | Near End CRC line error count |
| 30.2.10.0 | INTEGER | Far End CRC line error count |
| 30.2.11.0 | INTEGER | Near End HEC line error count |
| 30.2.12.0 | INTEGER | Far End HEC line error count |
| 30.2.13.0 | INTEGER | Near End LOS (Loss Of Signal) count |
| 30.2.14.0 | INTEGER | Far End LOS (Loss Of Signal) count |
| 30.2.15.0 | INTEGER | Near End LOF (Loss Of Frame) count |
| 30.2.16.0 | INTEGER | Far End LOF (Loss Of Frame) count |
| 30.2.17.0 | INTEGER | Near End line error count |
| 30.2.18.0 | INTEGER | Far End line error count |
| 30.2.19.0 | INTEGER | Near End Alarm Indication Signal: 0=no alarm, 1=alarm |
| 30.2.20.0 | INTEGER | Far End Alarm Indication Signal: 0=no alarm, 1=alarm |
| 30.2.21.0 | INTEGER | Near End Remote Defect Identification: 0=no defect, 1=defect |
| 30.2.22.0 | INTEGER | Far End Remote Defect Identification: 0=no defect, 1=defect |
| 30.2.23.0 | INTEGER | Upstream Capacity (in percent) |
| 30.2.24.0 | INTEGER | Downstream Capacity (in percent) |
| 30.2.25.0 | INTEGER | Upstream line attenuation |
| 30.2.26.0 | INTEGER | Downstream line attenuation |
| 30.2.27.0 | INTEGER | Upstream Noise Margin |
| 30.2.28.0 | INTEGER | Downstream Noise Margin |
| 30.2.29.0 | INTEGER | Upstream Output Power |
| 30.2.30.0 | INTEGER | Downstream Output Power |
| 30.2.31.0 | INTEGER | Link retrain count |
| 30.2.32.0 | Array | Carrier Load Array |
| 30.2.33.0 | INTEGER | Unable to initialize count |
| 30.2.34.1.1.1-96 | INTEGER | A 96 row table, index column. The value equals the instance. |
| 30.2.34.1.2.1-96 | INTEGER | Near End Error Second |
| 30.2.34.1.3.1-96 | INTEGER | Far End Error Second |
| 30.2.35.0 | INTEGER | Near End Error Second count for the day |
| 30.2.36.0 | INTEGER | Far End Error Second count for the day |
| 30.2.37.1.1.1-7 | INTEGER | Error Second for the day table – instance. Value = instance |
| 30.2.37.1.2.1-7 | INTEGER | Near End Error Second count for the day |
| 30.2.37.1.3.1-7 | INTEGER | Far End Error Second count for the day |
| 30.3.1.0 | INTEGER | Spanning Tree State: 0=other, 1=disabled, 2=enabled |
| 30.3.2.0 | INTEGER | VPI of bridged PVC |
| 30.3.3.0 | INTEGER | VCI of bridged PVC |
| 30.4.1.1.1.1 | INTEGER | Index of table |
| 30.4.1.1.2.1 | IpAddress | IP address of modem |
| 30.4.1.1.3.1 | IpAddress | Network mask of modem |
| 30.4.1.1.4.1 | INTEGER | Send RIP 1=RIPv1 2=RIPv2 3=Both RIP 4=None |
| 30.4.1.1.5.1 | INTEGER | Accept RIP 1=RIPv1 2=RIPv2 3=Both RIP 4=None |
| 30.4.1.1.6.1 | INTEGER | IP Forwarding: 2=None 3=All |
| 30.4.1.1.7.1 | INTEGER | DHCP Client: 1=other, 2=disabled, 3=enabled |
| 30.4.1.1.8.1 | INTEGER | NAT State: 1=other, 2=disabled, 3=enabled |
| 30.4.2.1.0 | INTEGER | Static Route Count 0 |
30.4.3.1.1.1.6 .112.117.98.108.105.99 | Hex-STRING | SNMP read-only community, 28 bytes long with 0 padding. eg fred = 66 72 65 64 00… |
30.4.3.1.1.1.7 .112.114.105.118.97.116.101 | Hex-S | SNMP read/write community, same encoding as Read-only |
30.4.3.1.1.2.6 .112.117.98.108.105.99 | INTEGER | ?? 1 |
30.4.3.1.1.2.7 .112.114.105.118.97.116.101 | INTEGER | ?? 2 |
| 30.9.1.0 | IpAddress | IP address of TFTP server |
| 30.9.2.0 | String | Remote filename on TFTP server |
| 30.9.3.0 | String | Local filename |
| 30.9.4.0 | INTEGER | Set to 1 to make modem connect to server |
| 30.9.5.0 | INTEGER | Set to 1 to get remote file |
| 30.9.6.0 | INTEGER | TFTP status: 0=idle, 1=Wait ACK, 2=Wait Data, 3=Sent Write Request, 4=Sent Read Request, 5=Done |
Some definitions you might find useful:
- Error Second (ES) – Any second where at least one bit error was received.