LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2004, 03:44 AM   #1
rodb
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
linking to an internal ip via external ip


Hi

I have an ADSL line to a linux box (RH9). If I want to connect remotely to a database on that box I use the connection string

165.165.xxx.xxx/mypath/my_database - this works fine.

But if the database is on another linux box on the LAN - what syntax should I use to point to the database?

I have tried

165.165.xxx.xxx:192.168.xxx.xxx:/mypath/my_database

This does not work.

If I am on the LAN I can connect to my database via

192.168.xxx.xxx:/mypath/my_database

Thanks

Rod
 
Old 02-03-2004, 04:02 AM   #2
nielchiano
Member
 
Registered: Feb 2004
Location: 50N 3E
Distribution: Gentoo
Posts: 64

Rep: Reputation: 15
You'll have to know what port(s) are used to access that db.
Eg: for HTTP transfers that port would be TCP/80.

Once you know that, you'll have to configure your gateway box (the one connected to both, LAN and internet) to forward all packets for port xxx to that specific LAN client.

try 'man iptables'
the syntax should be something like
Code:
iptables -A prerouting -p tcp --dport 80 -j DNAT 192.168.xxx.xxx
and maybe:
Code:
iptables -A FORWARD -p tcp --dport -j ACCEPT
Note: in this way you can only have 1 such db-server. If you need more, you'll have to ask some more IP's with your ISP.

Last edited by nielchiano; 02-03-2004 at 04:04 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd only can access for internal but not external bbmak Linux - Software 9 04-29-2005 08:36 PM
internal box to external IP's? TigZy Linux - Networking 4 09-29-2004 06:39 PM
Internal and External SCSI drives dka1 Linux - Hardware 1 03-15-2004 05:47 PM
Internal or External Modem noclue_menew Linux - Hardware 15 09-02-2003 05:20 PM
Modems: internal vs. external? Zen Arcade Linux - Newbie 7 06-21-2003 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration