Time Syncing Through a Firewall Without NTP? 112
dvdsmith asks: "Say are dealing with a Windows network that for internet access must pass through a firewall that you have no control over. Said firewall apparently blocks the known time protocols (NTP,daytime,etc) and you know from experience that those who control it will not allow any exceptions. If one sets up an internal NTP server (Windows XP or 2000 workstation) for all others to sync from, is there another reliable method for updating time on the server, like pulling from a Java website? See the time.gov website as an example. Any ideas?"
COOKING WEB SERVICES WITH ELZAR (Score:5, Funny)
We're going to sync with our outside web service using a simple SOAP client, written in whatever language you prefer, and setting the time. (Your users will get their time from you via NTP still, of course.) This isn't required, but for that fresh BAM! taste, it's recommended. Mind the delay calculations if you're writing the client side of it yourself [php.net], the WWWait will have a little bit more effect here depending on your setup. If you want to make it quick and dirty, there's no reason to go through the SOAP/WSDL hoops, the point is having it on a known port and piggybacking across HTTP's fame and success, and then sleeping with its girlfriend, and stealing her wallet on the way out. BAM!
Re:COOKING WEB SERVICES WITH ELZAR (Score:2, Insightful)
Re:COOKING WEB SERVICES WITH ELZAR (Score:2)
A SOAP client? Interesting!
Re:COOKING WEB SERVICES WITH ELZAR (Score:2)
Re:COOKING WEB SERVICES WITH ELZAR (Score:2)
I'd go for a much simpler approach. It depends on how accurate this needs to be, but find a web server with accurate time (Perhaps a friend has webspace or a dedicated server, or even a home DSL/Cable connection), and put a one-line PHP, Perl, anything, script on it that simply sends the timestamp. Perhaps try to speed things up marginally by removing all but the
Re:COOKING WEB SERVICES WITH ELZAR (Score:2)
Re:COOKING WEB SERVICES WITH ELZAR (Score:1)
FUNNY, but I totally disagree (Score:2)
If you have access to an external server, just tunnel NTP over HTTP. (http://htun.runslinux.net/docs.html [runslinux.net])
Essentially no programming required.
It might be slighly less accurate than your way, but only if the time on the existing server really is hyperaccurate.
(That is, SOAP directly to an authoritative time server is probably more accurate than a tunneling proxy, but a tunneling proxy is probably more accurate than the two s
Here's what I'd do... (Score:5, Insightful)
Take it up with management if said morons disagree.
Re:Here's what I'd do... (Score:1)
One basic problem is that the IT folks are being graded on keeping their costs down - but not graded on whether they keep the overall costs down.
Re:Here's what I'd do... (Score:2)
Who is playing the political games? IT does what the boss tells them to. If you are a typical slashdotter you do not play the political games well. So you should have your boss play them for you, that is his job. Just tell your boss that you need good time, and let him do it.
If you boss won't play those games, think about sending thing up the line. Start asking questions in the company meetings about why IT isn't responding to employee needs. Your point will get across. (Careful here though, thi
Re:Here's what I'd do... (Score:1)
W-e-l-l, IT's ultimate boss is 4 to 5 levels up in management (I'm part of a very large organization, IT is largely in India). My boss is well aware of the problem and his boss is well aware of the problem but isn't in the position to do anything about it. :-(
Re:Here's what I'd do... (Score:1)
Then go to someone who can. This is a no-brainer - it's probably worth speaking to your IT Security Head - any application logging is worthless unless you can rely on the timestamp. If your company is quoted on the NYSE - they'll have to answer questions like this soon anyway because of Sarbanes-Oxley etc.
Re:Here's what I'd do... (Score:1)
As far as SarbOx and $500 for a GPS NTP server - the IT guys may very well say that is small potatoes compared to the cost of a network breach - and they would most likely be right (probability > 99.9%). Even if that probability is small, it still may be cheaper to sprin
Re:Here's what I'd do... (Score:2)
If you are part of a truly large organisation, then, trust me - somewhere on your network a Time server already exists.
It would be cheaper still to state what you need (a valid reliable time source) and let the IT guys solve that problem - not "Some dork developer wants us to open up port what on the firewall?!?!?"
Re:Here's what I'd do... (Score:1)
LOL. We have 4 satellite receivers and an atomic clock on our private network. Trust me - I do. All I'm saying is that they should do something - either open the firewall OR multiple internal time sources (in LargeOrganisations(TM) and for SOX404 you need redundancy, and anyway from such a large network you probably don't want all your Tier 2 pointing at the same Tier 1). The Tier 1's ahould sync amongst themselves and
Re:Here's what I'd do... (Score:5, Insightful)
Go up the chain to whoever manages both the IT and your division. Say "We need time sync for such-and-such. It's necessary."
Give them a breakdown of costs like so:
$x for GPS stabilised NTP appliance.
$y for some bonehead in IT to open the port up.
Make sure you put the expensive one first. If it costs the IT department more to poke a hole in the firewall, well, hell, you'll get a new toy to play with. But most likely management will say (paraphrased) "WTF? Bring me the head of the IT department manager, on a silver platter."
IT departments are there to provide services for the rest of the company. That's their job. If they're not doing their job, call them on it. They're just a lead weight around the company's neck otherwise.
Re:Here's what I'd do... (Score:4, Informative)
$x for GPS stabilised NTP appliance.
$y for some bonehead in IT to open the port up.
And don't forget to include installation costs in the breakdown. Depending on your building infrastructure, you might have to run wiring for an external gps antenna, plus related costs of mounting an outdoor equipment, which will probably be done by the maintenance people or subcontracted.
Are IT departments there to provide service??? (Score:1)
In one college I teach in they have an internal time server, and that server is one hour off... The way they set it to daylight savings time is by adding one hour to UTC... (And by inspecting email headers I think that's the way most IT departments in Israel do it. Then of course they cannot sync to an external time server because then everything is one hour off what they think is correct. But it might be the common knowledge of all system admins in Israe
Re:Are IT departments there to provide service??? (Score:2)
Great Scott! The rest of the world (including weird places like Arizona that don't use summer time while everyone around them does) has no problem with shifting UTC offsets. (NTP itself is UTC, it doesn't care about time zones -- that's upto the user applications.) Why is Israel in this mysterious temporal anomaly?
Re:Are IT departments there to provide service??? (Score:1)
I guess that's because of politicians. The authority on setting the duration of Daylight Savings Time in Israel is given to the minister of interior. Over the past 30 years or so the politicians have been constantly changing the duration of daylight savings time to suit the needs of different political parties (or to comply with supreme court decisions when the court ruled the changes exceeded the minister's authority set in the law). Often it happened
Re:Are IT departments there to provide service??? (Score:2)
Ye Gods! That does sound like a mess. Why does the authority need to be given to someone? Just pass a law in the Knesset defining it, in terms of the Hebrew calendar as reqd. I assume the Hebrew calendar is not arbitrary, i.e. given a date, a computer can always ca
Re:Are IT departments there to provide service??? (Score:1)
Well... that's because politicians want authrity to do... whatever. Anything goes... It gives them bargaining power.
> Just pass a law
This finally happened this year. The compromise they reached includes starting on a day determined by the Gregorian calender and the end day by the Hebrew calendar. Both happen on 2AM on Friday or Sunday preceding the fixed date. So at least it's predictable.
> I guess it's just another example of things that wo
Re:Here's what I'd do... (Score:1)
Cost? 30 seconds to modify pf.conf and 5 seconds to load in the new rule. What's that for an hourly wage? Hell, drop 5 bucks on the table and the company made a profit.
Re:Here's what I'd do... (Score:2)
I think you misspelt "UDP" ;-). (IANA does list 123/tcp and 123/udp as both being NTP, but it only uses udp).
--
I'm not politically incorrect, I'm just differently articulate
Re:Here's what I'd do... (Score:2)
Well, any techie worth their salt shouldn't consider FTP except in very special cases. Plaintext passwords is a huge security hole in the security models at most businesses.
I always encourage use of SFTP instead. However, most developers seem scared of SFTP for some reason. It's pretty much the same darn thing.
And I always allow NTP
Re:Here's what I'd do... (Score:2)
Re:Here's what I'd do... (Score:2)
There seems to be a real lack of FTPS clients but plenty of SFTP clients.
And by installing OpenSSH, I gain access to other handy file transfer tools like SCP & Rsync over SSH which is incredibly powerful.
Re:Here's what I'd do... (Score:1)
Re:Here's what I'd do... (Score:1, Insightful)
Afterall, if those internal servers are not reliable, then that reflects poorly on the IT guys, which gives you even more leverage to justify removing the restriction.
Re:Here's what I'd do... (Score:3, Insightful)
Re: (Score:2)
Re:Here's what I'd do... (Score:2)
Based on my IT experiences, my guess is all of the above.
Re: (Score:1)
Re:Here's what I'd do... (Score:2)
Re:Here's what I'd do... (Score:1)
I strongly suspect said firewall is placed at country level (think Arab countries, or North Korea) and said "morons" are the boyz from the Interior - or whatever - Ministry. Now you were talking about taking up with the "management"...?
Re:Here's what I'd do... (Score:2)
I've been behind every national Arab firewall besides Libya (not sure whether they have one at the country level) and never had problems with NTP (or SSH or anything else, except a few web sites). Never been to North Korea but I doubt many people in North Korea are able t
More re ports blocked at country level... (Score:1)
Re:More re ports blocked at country level... (Score:2)
Cuba? Belarus? A Stan?
Re:Here's what I'd do... (Score:2)
Remember - Do not meddle in the affairs of wizards, for you are crunchy and taste good with ketchup.
Simon
Tunnel. (Score:5, Informative)
If you want precise measurement, this is the way to go. NTP software will correct the latency errors, no matter if you have direct connection or if it goes through tunnels around the globe, so you have precise time. But if you go for methods like reading time from website applet, all the network latency problems get completely neglected and just add up to the error of the internal server. You could just as well sync it to your hand watch instead.
radio (Score:4, Interesting)
or if any udp port is open in the firewall, set up a ntp server outside that answers on that port
Re:radio (Score:4, Insightful)
First get a written refusal in response to a written request to open NTP on the firewall.
Then use this to justify a hardware purchase for the clock hardware.
Wait till bosses realise that a $500 piece of kit and a couple of days setting up could be replaced by 5 mins configuration by a dolt.
Sam
Re:radio (Score:1)
Re:radio (Score:2)
Re:radio (Score:2)
You are already feeling the pinch of the scarcity of switch ports, juggling them around isn't a long term solution and one day the pinch will be very inconvenient.
Better get a new switch now before it gets urgent instead of afterwards.
The expense will be offset against the convenience now and the lack of severe inconvenience in the future.
Sam
Re:radio (Score:2)
Re:radio (Score:2)
Sam
Tunneling (Score:2, Informative)
Re:Uh, yeah - *great* idea (Score:2)
Re:Uh, yeah - *great* idea (Score:2)
Now, as the other poster who replied to you stated, virtually any protocol
Re:Uh, yeah - *great* idea (Score:2)
A friend of mine wrote a userspace application that allowed him shell access to a remote system when he was behind a gestapo firewall that not only restricted you to TCP/80, but it also further restricted you to HTTP.
He "simply" tunneled the shell commands and response thru HTTP packets. He figured he could forward just about anything else similarly.
Re:Uh, yeah - *great* idea (Score:2)
I realize this is
Re:too easy (Score:2, Interesting)
How about No need to parse the HTML, just use standard HTTP headers.
Re:too easy (Score:3, Informative)
Think of it for a while. The HTTP server takes its local date, writes it into a socket, and sends it to you. By the time you get it, the time will have changed. If your time was actually right, it'll go like this:
You (10:00:00): HTTP request
Server (10:00:01): Sends date
You: (10:00:02): Date received, set
And here you set the date backwards in time, which is definitely going to cause problems.
Two completely untested suggestions (Score:4, Informative)
2. Use HTP: HTTP Time Protocol [clevervest.com]
Re:Two completely untested suggestions (Score:1)
This might work if your server is near a window, or you could get a GPS with an external antena that you can run outside.
GPS's tend not to work too well when you are inside a building. Mine does not work inside unless it is near a window. In fact it does not work too well with heavy tree cover. If I am an a forest with large trees, and cannot see the sky, it gets no signal. Sadly, when I am in the trees like
Quit (Score:1)
You should use NTP (Score:5, Insightful)
If your boxes are hacked and you go into court and you can't demonstrate that your log timestamps have anything to do with reality, you might not be able to use them as evidence.
You also would like to be able to accurately judge HTTP cache timeouts and other time-sensitive things.
You also don't want your time to "step" (jump by more than one second) if you can help it. It screws up sensitive daemons and I've seen more than one box crash and burn and start spawning crap when the clock jumped backwards.
Have them open up the damn firewall, set up a reliable Unix-based NTP server on the inside that syncs to something outside, and have the workstations sync up with that.
You CANNOT tunnel NTP over SSH. NTP uses UDP.
You also don't want to just get the time from some web page and set the clock because your clock may jump, and you don't adjust for latency correctly either (NTP is *complicated* because there are a lot of edge cases and complex concepts here). Also you'd like to be able to select from multiple sources and throw out any outliers, in case one has been hacked.
If you can't do the sane thing, which is open up the firewall, you can just set up a local Unix NTP server and at least your boxes will all have the same time as that box, even if it's the "wrong" time.
You can also use GPS or a dialup modem to set the time on your NTP server.
To recap:
1) set up a centralized NTP server
2) sync to that NTP server
3) if possible, sync that NTP server to another external NTP server, OR a radio or modem signal.
It ain't rocket science folks.
Re:You should use NTP (Score:1)
Re:You should use NTP (Score:3, Insightful)
Kirby
Re:You should use NTP (Score:3, Informative)
It's standard and fairly si
Re:You should use NTP (Score:2)
Unless you are logging to write once media, or something other than a text file that you can manually edit, aren't many courts that'll consider logs as evidence. Police may like them, and use them as pointers for a trail to 'real evidence', but logfiles themselves wont stand up to cross examination, unless they are proven to be
"Atomic Clock" card (Score:5, Informative)
This is what this guy is really asking for (Score:2)
Is the router an NTP server? (Score:3, Informative)
If that doesn't work, try polling the local router. Try polling a remote router that's still inside the firewall.
A customer of mine has several sites, and the sites are linked through frame relay (or is it T-1?). The firewall blocks port 123, so NTP with the outside world is (generally) out of the question. However, the frame provider is MCI, who also happens to manage the routers for
I wonder if HTTP time on their server is reliable (Score:1)
HTTP/1.1 200 OK
Server: Netscape-Enterprise/4.1
Date: Sat, 30 Jul 2005 23:55:38 GMT
Content-type: text/html
Etag: "3f2f157-1-292b-41dc304b"
Last-modified: Wed, 05 Jan 2005 18:22:03 GMT
Content-length: 10539
Accept-ranges: bytes
You don't have milliseconds this way, but with a program smart enough you can collect them over time.
Not a "Java" website (Score:1)
Furthermore, all the Javascript does is tick a clientside counter. A timestamp is supplied when the page is loaded, and a javascript increments it using ticks on your PC, not the server.
You could parse the HTML page to pull off the timestamp. It wouldn't be very precise, but might be good enough. NTP does lots more then just ask a server for a timestamp though, it does predictions of network latency and factors that in as well.
Re:Not a "Java" website (Score:1)
Which brings us back to do.
Synced with what? (Score:4, Interesting)
Do the systems need to be synced to the outside world, or merely consistent with each other?
If the silly firewall people won't help you (you might remind them that you do in fact work for the same company...), you need to set up your own NTP server. Either a real one with a GPS receiver, or a pretend one that everybody can follow and have the same time, regardless of what that time actually is (see initial question).
The occasional phone call to the NIST's dialup time server [nist.gov] might be useful too.
...laura
is it your hardware? (Score:2)
Re:is it your hardware? (Score:2)
Sounds like you're after htpdate (Score:2)
There's a perl implementation that will work on Windows machines.
Naviscope (Score:1)
Other features include: DNS caching, programmable (delayable) prefetch by site including number of threads and depth, blocking of (simple) advertisements, site backgrounds, blinking text, pop-ups (while loading or entirely), UserAgent, Referrer, cookies, Javascripts, and
Need vs Want (Score:1)
If you can get by with keeping the same time, set up a master/secondary time server and keep time with those.
If you need accurate time, you start with a formal request to the group that maintains the firewall. State your case, list the time source(s) you'll be using. Assuming that request is turned down, you provide the quotes for setting up in house time
cisco! (Score:1)
Failing that, look at clockspeed from DJB. He's terribly clever.
--
lds
Use the HTTP Date header (Score:2)
For example, try:
curl --head http://www.google.com/ [google.com]
NIST.pl (Score:2)
UK Rugby Time transmitter (Score:1)
You can get a serial dongle and software that receives this for very little money.
US Naval Observatory - Time Service Department (Score:2)
Use a cheap GPS (Score:3, Informative)
$GPRMC,HHMMSS,A,LATITUDE,N/S,LONGITUDE,E/W,SPEED,
A search on Google for "Delorme Tripmate" and/or "NMEA-0183" should turn up plenty of info.
I use a Tripmate in my car connected to a Microchip PIC and an LCD to display time, date, location, speed and direction.
Re:Use a cheap GPS (Score:2)
Re:Use a cheap GPS (Score:1)
There are inexpensive OEM GPS boards that include a precision PPS output that work very well with NTP.
Getting the IT idiots to open up the NTP port seems like the easiest thing though.
Second resolution out of HTTP (Score:1)
$ telnet ntp.isc.org 80
Trying 204.152.184.138...
Connected to ntp.isc.org.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 302 Found
Date: Sun, 31 Jul 2005 17:10:58 GMT
Server: Apache
Location: http://ntp.isc.org/bin/view/Main/WebHome [isc.org]
Connection: close
Content-Type: text/html; charset=iso-8859-1
Connection closed by foreign host.
Ask for an NTP source (Score:2, Interesting)
TV tuner card (Score:2, Interesting)
This is so easy, it hurts... (Score:1)
Sometimes having Linux-on-the-Brain makes you dumb...
Re:This is so easy, it hurts... (Score:2)
Re:This is so easy, it hurts... (Score:2)
He's asking how to go about syncing the domain controller (or equivalent workstation with time server) to the outside world, tard.
Ask around first, then buy a cheap GPS (Score:2)
GPS time piece (Score:2)
GPS-based NTP appliance (Score:2)
http://www.truetime.net/nts200.html [truetime.net]
The old-fashioned way (Score:1)
Hardware boxes (Score:3, Interesting)
CDMA in turn gets its time from GPS, but is far easier to receive in most locations - no need to run an antenna cable up to the roof. They also tend to be cheaper.
Re:Hardware boxes (Score:2)
Re:Hardware boxes (Score:2)
In practice, I have never found the time displayed on my phone to be incorrect (as compared to an NTP-synched box). I also regularly find time.twc.weather.com as the primary source in my NTP list(s) -- notable as that *is* a CDMA-based box.
YMMV....
Do you really need to go outside the network? (Score:2)
If it's the latter (and assuming the servers support feeding time to clients, which they probably do), you can use a windows task on the client machines to run the following command:
net time \\server
You can put that into a batch file, put a "cls" at the end, set the task to run said batch file (as an account with admin priv's) and make it run whenever you feel like it. Logo