PDA

View Full Version : Internet: IP one way to mail one way to web



pzkpfw
25th January 2012, 12:14
For my business I have a domain name. And I have someone hosting a website and my email.

And stuff addressed to my domain goes to the correct web and email servers. (i.e. www.notmyname.co.nz and notmyname@notmyname.co.nz)

However, I don't really use that hosted web site, but lately installed a web server at home to show a demo to a client. Got Xtra to give me a fixed I.P. address for that.

So I'm wondering if it's possible to fiddle my I.P./domain settings so that my email is still hosted by those folk (I need that to be reliable) but have web traffic come to by home I.P. ? (i.e. something like the domain pointer entries separate for different ports?)

I set up some of this stuff myself, years ago, but being so long ago and not stuff I do "every day" I am very much not an expert.

Clues?

Latte
25th January 2012, 12:22
Should be easy, your DNS provider (probably the people you bought the domain name through) can forward your mail (mx) to the existing mail server, and either the full hostname (notyourname.co.nz) or just www.notyourname.co.nz, or anythingyoulike.notyourname.co.nz to the static IP.

If you do that though make sure you're well tied down firewall wise at home, and you might need to forward port 80/443 etc (although if you can browse your website using the external IP already then thats already covered).

mashman
25th January 2012, 12:27
I used to use DYNDNS for that sort of thing years and years ago... unfortunately their services cost these days. Depending on how you site is written, you could throw in some form of coded redirect. Depending on your webserver you could catch all HTTP 200 calls and redirect to your fixed IP.

steve_t
25th January 2012, 12:34
Why would hosting your emails along with your site not be reliable? Sorry, noob here

pzkpfw
25th January 2012, 12:54
Why would hosting your emails along with your site not be reliable? Sorry, noob here

My "web server" is just for temporary once-in-a-while demo use. I'm not actually hosting a business site on it, I'm just a developer, and sometimes need to show people stuff. (Actually, at the moment it's hosting an X509 protected .Net/WCF service, and some Java developer guy is trying to write a client to call it).

Because my Broadband port comes to my bedroom, and the PC I had available for use didn't have wrieless, I've got the thing temporarily set up - in my bedroom physically plugged into my router. So it gets turned off at night.

At home, for these purposes, I just don't want to commit to having to run anything with 24x7 type up-time. I need to be able to kill the machine at any time.

Now, that's the reverse of my email. I quite like that being hosted by someone else, with redundant hard drives and U.P.S.'s and proper engineers and stuff.

---

Thanks for the advice(s) above.

pzkpfw
25th January 2012, 12:59
Should be easy, your DNS provider (probably the people you bought the domain name through) can forward your mail (mx) to the existing mail server, and either the full hostname (notyourname.co.nz) or just www.notyourname.co.nz, or anythingyoulike.notyourname.co.nz to the static IP.

Cool. I need to dig up the instructions for logging on to the domain host site, and see what I can find. I guess "MX" is a keyword I'm looking for...


If you do that though make sure you're well tied down firewall wise at home, and you might need to forward port 80/443 etc (although if you can browse your website using the external IP already then thats already covered).

Yeah. My router just forwards (only) ports 80 and 443 to my web server. I've built self-signed certs for SSL so even the 443/HTTPS stuff works fine.

On the web server at present I'm actually only running Windows Firewall, but that too is set to only allow ports 80 and 443 in.

(I've already seen in the logs, requests to pages coming from random I.P.'s, that look like someone fishing for stuff like PHP admin pages with known secuirty faults or something.)

Most people I need to show stuff to come from specific IP's (i.e. their company proxy server) so I think I'll probably set up the router to only allow incomming requests from specific IP's, as and when projects require it.


Cheers,

Mental Trousers
25th January 2012, 13:24
Might be best to point something temporary at your static ip, for instance devel.notmyname.co.nz

Get the details for your DNS provider


add a new "A" record for a subdomain devel.notmyname.co.nz
figure out the ip of your email server
Make sure the "MX" record is pointing to it and isn't just an alias for "notmyname.co.nz" otherwise if "notmyname.co.nz" changes it'll change your MX record too



Usually takes about 4 hours max to propagate (depends on your provider) but then when you point your browser at http://devel.notmyname.co.nz it'll go to your bedroom (you're not gonna be streaming a dodgy web cam are you?? :facepalm: ). The original http://notmyname.co.nz will still go to where ever it points at the moment.

tuirider
25th January 2012, 13:56
So I'm wondering if it's possible to fiddle my I.P./domain settings so that my email is still hosted by those folk (I need that to be reliable) but have web traffic come to by home I.P. ? (i.e. something like the domain pointer entries separate for different ports?)

Clues?

You need to set the MX record for your domain to the hosted hosts address, e.g. add a sub domain mail.whatever.com and point the MX record to it.

Mike

avgas
25th January 2012, 14:12
I used to use DYNDNS for that sort of thing years and years ago... unfortunately their services cost these days. Depending on how you site is written, you could throw in some form of coded redirect. Depending on your webserver you could catch all HTTP 200 calls and redirect to your fixed IP.
Nope they still give you 3 freebies. I use it for some of the control stuff I do. Even paid is only something like $10/year

pzkpfw
25th January 2012, 14:13
(you're not gonna be streaming a dodgy web cam are you?? :facepalm: )

As soon as I can force it into peoples PC's and then they have to pay me to turn it OFF.

(Good advice, also, in your post, thanks.)


tuirider: post #1 for me? Thanks.

Gremlin
25th January 2012, 14:28
From what I understand, you want to basically access a website at your house, leave your mail and main website alone etc.

1) Don't mess with your MX record, that IS your mail.
2) You need to know who is hosting the records for your domain. These are the NS records. Not necessarily your domain provider, but usually is. If you PM your domain I can find this out easily enough.
3) As MT suggests, add a sub record with whoever is hosting the records, something like temp.yourdomain.co.nz (or house, or whatever, possibly something not obvious), set the A record to your house IP.
4) Set up your port forwarding internally at home to forward 80 (or whatever port you'll access on) plus any translation as necessary, to the server that's listening.

It won't touch your main website, or your email, and you can turn off the record (and back on) any time you like.

The one caveat here is your web developer. I've come across some really good ones, who understand all this, but also some that shouldn't call themselves web developers, and believe they have to have total control over a domain to make their website work (because their web tool says so).

pzkpfw
25th January 2012, 14:30
Right. So it looks like two options. Either

A: point my web addresses to my new home IP. (In the attached pic, change the two IP's (111's) shown at the top, next to my domain name, to my new 222's IP).

or

B: make a new sub-domain, pointing to my new IP. (In the attached pic, add a new "test" or whatever sub-domain in the new row at the bottom. (Showing 222's as my new I.P.)

Either way, I just leave the two MX addresses pointing where they are.

Awesome. Thanks KBers.

One last question (I hope): in option B does the common name on my server cert (for SSL) need to be (I'm guessing this) "test.notmyname"; or still just "notmyname"?

Gremlin
25th January 2012, 14:40
Just clarifying your picture.

First two lines is for web... ie, people can type notmyname.co.nz or www.notmyname.co.nz and reach your website.

The interface is simplifying it a bit, not allowing you priority settings on MX etc, but anyway.

5th line (what you've entered) is good...

Re SSL, you should be able to put both of those names on the cert... but now we're heading down something I rarely interact with... once a year or so... Any reason you need SSL?

pzkpfw
25th January 2012, 14:55
Any reason you need SSL?

Just so it's available for test purposes.

I currently have a cert on there with the I.P. address for the common name, and it works fine. (If the cert name and URL don't match, browsers can get pissy.)

(In my current situation (testing a web service) I've had to drop SSL, though, as WCF doesn't allow certain combinations of Message+Transport security, at least not via standard or custom configuration, and I didn't want to get into custom coding the service handlers. Bloody annoying, as with the old WSE 2.0 framework it was dead easy to set up a secure service (WS-*) and then just call it over SSL.)

Gremlin
25th January 2012, 14:58
And now you're over my head :innocent:

Contract network management is my arena... so websites are something contractors build :D

Mental Trousers
25th January 2012, 17:09
The info in the pic is good, but personally I'd change the 2nd line to read


www.notmyname.co.nz - IP v4 (CNAME) - notmyname.co.nz

A CNAME is an alias/pointer.

Not necessary but I always reduce how many actual ip numbers are involved cos it sucks arse having to change the same ip number 10+ times, whereas with CNAME's you do it once.

The MX record you've got there is fine. No need to change it.

As for SSL, I just use a self signed certificate on all of our servers and tell Go Daddy etc to jam it. Nobody outside our office is going to be using https with our machines and if they are then they get to pay for the certificate.

http://www.akadia.com/services/ssh_test_certificate.html

Gremlin
25th January 2012, 17:34
We use SSL certs for lappys/mobiles etc connecting over the internet to exchange. Outlook RPC over HTTP (forget the new name for it...) kicks up a hell of a fuss with self-signed certs.

pzkpfw
25th January 2012, 19:05
The info in the pic is good, but personally I'd change the 2nd line to read

...

A CNAME is an alias/pointer.

Not necessary but I always reduce how many actual ip numbers are involved cos it sucks arse having to change the same ip number 10+ times, whereas with CNAME's you do it once.

That's good info, thanks. I'll probably leave it alone as I just don't have that many entries to worry about; but that's information I'll hopefully retain for later use.


The MX record you've got there is fine. No need to change it.

Yep. Made the change today, using option B, and I'm still getting mail - so that's a relief.

The new http://dev.notmyname.co.nz correctly gets to my home web server.

(I used option B, because I looked at my hosts website and there's no email-only option, so I figured since I'm paying for the "website" too, I may as well leave it there just in case. May one day have something I need hosted 24x7.)


As for SSL, I just use a self signed certificate on all of our servers and tell Go Daddy etc to jam it. Nobody outside our office is going to be using https with our machines and if they are then they get to pay for the certificate.

http://www.akadia.com/services/ssh_test_certificate.html

Yeah, I'm making my own certs (a CA and one for the site itself, plus more (client and server-side) for the web service I'm testing) using the Microsoft dev tool "makecert".

I just find having the cert name match the site name removes one warning, and makes clients feel happier. Otherwise people can worry about why they get the warning.

I still have to get them to accept my "NotmynameCA" certificate authority cert as trusted, but that's easyish to explain, and once the website gives no "errors" it all looks good.

Cheers,

pzkpfw
25th January 2012, 19:14
Thanks, everyone.

256004

thecharmed01
25th January 2012, 23:01
Late in the game, but have you looked at Google Apps.
They route all mail etc through the cloud with GMail type access, but using your domain instead of an @gmail.com address.

I have it setup for over a dozen domains and it's super easy.
Also makes access from anywhere simple, just go to gmail.com and login with your full domain email and your password.

pzkpfw
26th January 2012, 09:21
Late in the game, but have you looked at Google Apps.
They route all mail etc through the cloud with GMail type access, but using your domain instead of an @gmail.com address.

I have it setup for over a dozen domains and it's super easy.
Also makes access from anywhere simple, just go to gmail.com and login with your full domain email and your password.

Yes, probably would be a good thing, but my current email host does the biz and I'm happy enough.
(
I mostly use Outlook on my Laptop, but they do have a web mail interface so I can access (new mail) via any browser any time.
My phone connects to them fine, and can send/receive.
I've got my IIS connected to their server too so I have my own local SMTP server relaying via my domain/account.
All seems OK.
)

scracha
1st February 2012, 22:57
If you do end up running a mailserver, then it's a good idea to have a secondary MX in the event your mailserver goes down or gets disconnected. If it's a small organisation then pointing it to a cloudy based mailserver is a good plan. A really good plan is to have the cloudy based mailserver's mail arrive on your own mailserver automatically when it's back up and running.

Personally I'm a bit paranoid and don't trust a 3rd party to store all a customers mail....so I have mail for most customers on 2 different servers (sometimes as simple as forwarding a copy of all email to another domain).

And google apps domains thingie is the shizz and it's free for up to 10 users. Good tools there to migrate from other email systems. Works with pretty much everything.