PDA

View Full Version : Two computers, one ip, one port.



hernan
01-13-2005, 09:22 AM
Well, the thread subject basically says it all.

I have a router that routes my internet connection to my linux server and my winxp desktop.
From school, the only port that's open is port 25, so it's the only way i can connect to my home computer. Right now, I set up my router to forward port 25 to my desktop's Remote Desktop Connection, and i can connect from there.
The problem is, I'd like to share that port with linux, so I can also SSH into the computer remotely. It'd be much simpler sometimes, and a lot faster, than RDC'ing in to my desktop.

I know there's no way to do what I mentioned with ONE ip, but I also have about 5 domains pointing to my IP by using free dns records (they're not subdomains, they're domains using free dynamic dns records).

I know apache is able to understand what domain the request is coming from, but is there a way to make it so if I request information from domainX.com I'd connect to my home computer, and if i connect from domainY.com, i'd SSH into my server?

(Maybe some kind of port forwarding in the linux box)

Thank you very much, and if there IS an answer, try making it easy to understand, I'm kind of a noob at linux.

Thank you again.

Hernan

Harry Kuhman
01-13-2005, 09:42 AM
...From school, the only port that's open is port 25, so it's the only way i can connect to my home computer.....
Are you sure of this? It sounds pretty strange. Port 25 frequently is blocked (since some service providers consider it abused by spammers and make an overkill move of completely blocking it except to their own news server). But for your school to block all other ports from the school would imply that you couldn't even access a website (port 80 as well as several other ports). In fact, about the only thing you could do with your network would be to send out lots of e-mail. I rather suspect that other ports are open, and if that's the case then there are lots of ways you could deal with this. Even if only 80 were also open, many brands of routers will let you manage them remotely, and while they usually default to port 8080, you should be able to move the management of the router to port 80 if you really have to.

hernan
01-13-2005, 09:47 AM
I'm pretty sure that's how it works, port 80 is redirected through a gateway. Port 25 is the ONLY port that's open, not restricted.

I know this because I changed my port to 25 in my windows box (RDC) and I'm able to connect to it from there.
And if I want to use AIM, every time I open the client, I have to change the port it uses to 25.

Also, my router is a Microsoft Base Station, and the piece of crap will drop the internet connection if I make any modification to its settings.

One last thing, and this proves all the other ports are blocked at my school: HTTPS is blocked because port 443 isn't open.

hernan
01-13-2005, 09:54 AM
Here's a mini diagram I just made

[img=http://img52.exs.cx/img52/2646/diagram8wx.th.jpg] (http://img52.exs.cx/my.php?loc=img52&image=diagram8wx.jpg)

Harry Kuhman
01-13-2005, 10:32 AM
One last thing, and this proves all the other ports are blocked at my school: HTTPS is blocked because port 443 isn't open.
Well, no, port 443 blocked means port 443 is blocked. It doesn't prove all other ports are blocked, and certainly doesn't prove all ports except 25 are blocked. Maybe they are, but your statement "this proves all the other ports are blocked" doesn't seem to be valid.


Also, my router is a Microsoft Base Station, and the piece of crap will drop the internet connection if I make any modification to its settings.
AH, shows pretty much their understanding of remote management, eh?

Why do you believe that port 25 is the only one open? If port 25 is open, then I would certainly expect port 110 to be open (I would expect it to be open even if 25 was not).

hernan
01-13-2005, 07:12 PM
Well, 25 is the only port that seems to work, maybe I should do a port scan.

Harry Kuhman
01-13-2005, 08:18 PM
Well, 25 is the only port that seems to work, maybe I should do a port scan.
Or maybe just try to access an e-mail server outside of the school network, as that's the normal use of port 110. I still have no idea why you think all ports are closed except 25 is open.

pureone
01-14-2005, 12:46 AM
i dont not understand what you mean port 25 is open, from my understanding of how ports work. if a port is open that indicates that a service is running, not that there will no restriction on the useage of that port for means of remote connection.

if you can visit https://login.passport.com or what ever msns log in page is then the useage of 443 as a remote port is not blocked.


as for using linux as a dns server i suggest using your routers NAT feature for this.

hernan
01-14-2005, 01:20 AM
Guys, I just did a port scan from a school computer, and I found more ports that are not blocked. I guess I will just use one of those :D
Thank you both for your help anyway.


Hernan

pureone
01-14-2005, 02:42 AM
what other ports can you use?

i think your mixing up what a port actuly is. if i was to do a port scan on my router and find that port 80 wasnt up then this means that there is no webserver running it does not mean i cant go to www.google.com which listerns on port 80 it just means theres no web server running on that port.

so if you port scan your gateway and find open ports this does not mean these are the remote ports you should use to connect to other machines or local ports that you should use to connect to other machine it just means theres services runing on them ports