LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-14-2004, 10:22 AM   #1
Saints
LQ Newbie
 
Registered: Jan 2004
Posts: 3

Rep: Reputation: 0
Public IP to Private for VPN type work


Hi,

OK here's the setup. I have my main router (RedHat 9) with 4 network cards in it. One card links to my 2mb pipe and has a public IP address, one goes to my servers and has a block of 255 public ips routed to it, and the other two go off to the internal networks.

Now here's what i'm trying to do. I want to link one of the 255 public block ip's I have to one of my private ips further down my network so that external users can type in that public IP and get to this VPN type box (but it is a web interface I believe not a dialin type VPN) that has that private IP. Now, I've had it kinda working by this I mean that anyone on the internal network that types in that external IP address can get the login screen for the VPN box but anyone outside the network can not.

To link the public and private IP's i have used the following command:

ip route add nat xxx.xxx.xxx.xxx via xx.xx.xx.xx
ip rule add nat xxx.xxx.xxx.xxx from xx.xx.xx.xx

So, any ideas???
 
Old 04-14-2004, 10:25 AM   #2
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
I would think that you'd want a "redirection" rule in your firewall to say something like "allow hostx coming to public IP x on port 80 in, then redirect that traffic to portx on internal/private IP portx". I don't know the syntax of the firewall you're using, since I'm more familiar with OpenBSD's pf, but that's how I'd personally do it.

Forgive me if I was way off base.

Dave
 
  


Reply


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
public, private, protected...?(C++) name_in_use450 Programming 6 10-08-2008 12:43 AM
ssh public/private keys lord_darkhelmet Linux - Newbie 8 10-29-2005 04:14 PM
public service, private CVS? prell Programming 7 01-15-2005 01:18 AM
public vs private ip emailssent Linux - Networking 2 09-28-2004 03:11 AM
Linking Public IP to a Private IP Saints Linux - Networking 0 05-04-2004 05:33 AM

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

All times are GMT -5. The time now is 12:54 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