Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


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

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


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 - 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

This does not work.

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


Old 02-03-2004, 04:02 AM   #2
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
iptables -A prerouting -p tcp --dport 80 -j DNAT
and maybe:
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

All times are GMT -5. The time now is 07:04 PM.

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