How easy would it he to rig something like this up?

Forums General General Discussion How easy would it he to rig something like this up?

Viewing 4 reply threads
  • Author
    Posts
    • #43114

      Alright, lemme explain the situation. At my parent’s house back home, I have a web server set up linked up with DynDNS’s service (automatic IP updates to domain names). So everything there works fine. I have a personal domain name that I use to easily have HTTP access to my files and such.

      Now at my apartment (I’m away at college :mrgreen: ), I would like to set up a subdomain that points to my IP address here. This would be sweet because then I could remote desktop to my computer here and deal with my local files easily and such. I’m pretty sure that DynDNS’s service wouldn’t do the trick in this case. I was thinking that I could set up a recurring FTP transfer that would transfer a text file that contained my IP address at my apartment to my server back home.

      After this point I’m lost. Is there a way to do IP address redirection in IIS from a text file? How possible is it to set something like this up? Thanks in advance! 😀

    • #46296
      Arris
      Moderator

      Hello nrajlich,

      A redirection from a textfile is possible via the following ASP.NET code:
      Default.aspx

      <%@ Page Language="C#" %>

      Modify the path to your own path, put the ip address in there and place the Default.aspx file within the inetpub folder!

      BTW you can also use WebDAV in IIS to access the files and folders on the server like it is a file server in the network. It will also go through the firewalls at your school network. 😉

    • #46297

      The script you posted would also change the address bar to the ip address. as in, when you go to subdomain.domain.com it would change to your ip address. I’m looking for a way to mask the IP address, and leave the domain name intact. Do you know of any way to do this through Server? Otherwise it would be more related to DynDNS I think.

      EDIT: Here’s a little Java program I wrote to make a text file containing your local IP address:

      import java.io.*;
      import java.net.*;

      public class IPAddressWriter {
      public static void main(String[] args) {
      URL ipURL = null;
      BufferedReader in = null;

      try {
      ipURL = new URL("http://whatismyip.org/");
      } catch (MalformedURLException e) {
      e.printStackTrace();
      }

      try {
      in = new BufferedReader(new InputStreamReader(yahoo.openStream()));
      BufferedWriter out = new BufferedWriter(new FileWriter("ip.txt"));
      out.write(in.readLine());
      out.close();
      in.close();
      } catch (IOException e) {
      e.printStackTrace();
      }
      }
      }

      So, now I can schedule a Windows task to do an FTP transfer to my computer at home, so that leaves only one more hurdle: getting a subdomain redirected to that text file…

    • #46298
      Arris
      Moderator

      Then you have to set up your server as a DNS Server by adding the serverrole DNS Server and configuring your zone like in this Windows Server 2003 DNS Server tutorial. It will be a little different from the Server 2008 wizard, but you ‘ll find out. Use nrajlich.dyndns.org (or whatever you have) as Zone name (step 5) and fill the ip of your other home in at step 9.

      Forward port 53/udp at your servers router to allow incoming dns queries.

      Never worked with DNS Servers before but I think it should work! 🙂

    • #46299

      Sweet! Thanks! I’ll try to set that up this weekend when I go home. Ya I alway wondered if that DNS Server role had anything to do with it. Looks like I’m messing around with that! Thanks for the replies Arris

Viewing 4 reply threads
  • You must be logged in to reply to this topic.