Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   Accessing my Server Locally (https://thetfp.com/tfp/tilted-technology/92576-accessing-my-server-locally.html)

GreasyP 07-27-2005 11:59 AM

Accessing my Server Locally
 
This seems like it would pop up a lot, but my Google searches have been in vain so I'm hoping you folks can help out.

I've set up a web/email server over my DSL connection at home, since my ISP doesn't have a problem with it I figured I'd save some money by cancelling my hosting account and going at it myself (very low-traffic site). I've got it all set up, pretty standard, FreeBSD 5.4 with Postfix, Courier, Apache, etc. Forwarded the necessary ports through my router. It's all working correctly.

My question is, though, how do I use my laptop to access the server to check email / view web pages when I'm on the local subnet (on the same router)? Obviously, when I try to access, say, mail.pocketmartiansoftware.com it doesn't work correctly because the IP is of the router I'm behind. I don't want to just set it in /etc/hosts, because I also take my laptop to school and use it there, where I'm not on the same subnet. Is there some more elegant solution? I've looked over all the settings in the router and nothing looks like it'll help. It's an Actiontec DSL/wireless router, if it makes a difference.

Thanks a ton, I just know I'm missing something obvious here. :rolleyes:

bendsley 07-27-2005 12:23 PM

just put in the hostname.

if it's hostname is mail.whatever.com, put in mail.

You can give the server a different hostname, even a different IP address if you want it to be privvy only to the inside.

Set it up in the DNS area of your router or FreeBSD.

vanblah 07-27-2005 02:04 PM

How is DNS assigned to your laptop on your internal network?

You need an internal DNS server with local IP addresses for your server(s).

You need to assign this DNS server as the primary DNS server on your laptop.

GreasyP 07-27-2005 04:08 PM

vanblah --

I think I see what you mean. I'm using DHCP for the laptop, and my DNS is just dynamic through my DSL ISP. So what you're saying is I need to set up DNS internally on my subnet somewhere, and then use that as primary DNS? I'll look around the net, see how it's done. Thanks.

skaven 07-30-2005 03:09 PM

Yeah I think vanblah is on the right track. Set up named on your BSD server and have it resolve your domain's addresses to the local address. The DNS provided externally won't be affected, because your domain's SOA isn't your BSD box. When you're inside the network, you'll be polling your BSD box for the address of "mail.pocketmartiansoftware.com", which you can have configured to return "192.168.0.4" or whatever it is. When you're outside the network, whatever DNS server you're using will locate the "normal" IP address, which should be the same as the external IP of your router, and thus working seamlessly from both locations.

In my case (I've got the same type of setup at my place), I just set up /etc/hosts on all my systems, since my server's IP and name won't be changing for a long time, and I'm too lazy to set up named to do anything beyond a caching nameserver.

GreasyP 07-30-2005 08:05 PM

Yup, thanks for the tips. I got it working. For posterity, here's how I solved it:

- Installed dnscache and tinydns from ports (great article on setting them up here)
- Used svc to run them as daemons
- set them up to redirect calls to the sites I'm hosting to the local IP when I'm using it's nameserver (see the link)
- Told my router to use my server's nameserver instead of my ISP's so DHCP clients use it automatically (the server is a static IP outside of the DHCP range, everything else is DHCP)
- Told my server's nameserver to use my ISP's nameserver for names it doesn't know.
- Beauty. I can now check my email and such without changing any settings, whether my laptop's on the local subnet or anywhere else.


All times are GMT -8. The time now is 04:44 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360