LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Accessing LAN from outside (https://www.linuxquestions.org/questions/linux-networking-3/accessing-lan-from-outside-286501/)

OliXNet 02-05-2005 05:56 AM

Accessing LAN from outside
 
Hello... I have my domain (OliXNet.com) and I have a server and one client on LAN. I would like to access that client with address something.OliXNet.com. Server is running on Mandrake 10.1. And I'm new to Linux.
Thank you very much

daft 02-05-2005 06:49 AM

I think you need 2 internet IP's for that

musicman_ace 02-06-2005 05:20 AM

Access the client how, Is it hosting a website? Do you want to telnet/ssh to it? FTP to the client? It is most definitely possible and you don't need a second IP.

OliXNet 02-06-2005 05:30 AM

I would like to access client trough SSH, FTP and to play some games online without use of public servers.

oddo 02-06-2005 05:34 AM

What services do you want to acces on that LAN station?
You can configure in DNS zone OliXNet.com that something is your IP address
( if your public IP is let's say 193.1.1.1.add a line like this at the end of olixnet.com ;
something A 193.1.1.1)

Restart bind.

Finally you have to DNAT requests to that machine
iptables -t nat -A PREROUTING -m tcp -p tcp --dport 22 -j DNAT --to 192.168.1.1

iptables -t nat -A PREROUTING -m tcp -p tcp --dport 21 -j DNAT --to 192.168.1.1

Make sure that the machine 192.168.1.1 has internet access

OliXNet 02-06-2005 05:59 AM

Thank you for the answer!
But this will redirect all the requests on ports 21, 22 to the LAN client. I want to redirect only requests going to client.olixnet.com. Other requests (going to eg. server.olixnet.com) should be handled by the server. Sorry, I probably asked incorrectly.

OliXNet 02-07-2005 09:34 AM

cmon.. noone knows? Please..

musicman_ace 02-07-2005 11:20 AM

Both Oddo and I figure we might be able to help, but we have no idea what services/protocols you want access to.
Are you running your own DNS or is that service provided by someone else.

OliXNet 02-07-2005 12:10 PM

It's not my own DNS server. I would like to access ports 21, 22, maybe 80 and some gaming ports. So FTP, SSH, HTTP and games.. Thank you very much for the answers

oddo 02-07-2005 04:43 PM

Ok...there is no problem...You can "remap" your ftp and ssh daemons on lan station to listen on different ports, let's say ssh-2222, and ftp 2121( of course if your ISP doesn't drop theese requests). Then you DNAT 2222 and 2121 like this
iptables -t nat...... --dport 222 -j DNAT --to 192.168.x.x:22

About your subdomain something:

I dig for olixnet.com and I have learned out that the authority DNS server is ns.forpsi.net belonging to IHOLDINGS.COM, INC.
Is this your provider? I guess you can ask them to add a subdomain in your zone.( it should be written in the contract or the rules you got when you bought the domain).
Anyway I advise you to do the DNAT first, try from somewhere outside, and than talk to your ISP.

Good luck

OliXNet 02-08-2005 02:22 AM

Yes, that`s my isp. I know about this, but is there any way to forward all the requests going to client.olixnet.com to my client? Like this: Server gets a request to client.olixnet.com:80, so it sends it to client.olixnet.com:80 or serverg gets a request to client.olixnet.com:7979 (no matter what this is), so it sends it to client.olixnet.com:7979. I mean is there any way to forward all the traffic going to client.olixnet.com to that client?
Sorry, if this is a dumb question and sorry, for loosing your time, but I need to know... Thanx

musicman_ace 02-08-2005 05:46 AM

In my mind, if you don't have direct control over your domain's DNS and zone configurations, it ain't going to happen. Maybe oddo's suggests can work out, maybe you'll have to run a small DNS slave on your server?


All times are GMT -5. The time now is 03:47 PM.