Networking Forums

Networking Forums > Computer Networking > Linux Networking > "outsourcing" services

Reply
Thread Tools Display Modes

"outsourcing" services

 
 
Frank de Bot
Guest
Posts: n/a

 
      10-20-2004, 08:35 PM
Hi,

I have one PC connected to the internet which runs all kinds of
services, but it's kind of slow, so I want to "outsource" some of them
to other PC's in the lan. I've got this iptables rules:

iptables -t nat -A PREROUTING -p tcp -d $INTERNET_IP --dport 8080 -j
DNAT --to-destination $OTHERPC_IP:80
iptables -t nat -A POSTROUTING -d $OTHERPC_IP -p tcp --dport 80 -j SNAT
--to


$INTERNET_IP is the internet IP address of the box
$OTHERPC_IP is the LAN ip of the other box running the service (http ;-)
$MYLAN_IP is the LAN ip of the box connected to the internet.

When I connect to $INTERNET_IP 8080 the webserver says my IP is
$MYLAN_IP !!! But it needs to recognize the IP of the one who has
connected else I can't apply security rules by IP (My LAN is allowed to
do practical everything). I remember I've managed in the distant past I
had iptables setup the way the clients IP was seen by the LAN pc's
webserver. But I don't know how.
Does anyone know it?

Thanks in advanced,

Frank de Bot!
 
Reply With Quote
 
 
 
 
Ken
Guest
Posts: n/a

 
      10-21-2004, 03:41 AM
Hi Frank -

On Wed, 20 Oct 2004 22:35:42 +0200, Frank de Bot
<ppi_doenst@like_spam.searchy.net> wrote:

>iptables -t nat -A POSTROUTING -d $OTHERPC_IP -p tcp --dport 80 -j SNAT
>--to


You're missing the last part of the command, but that's irrelevant.
This command says to the change the source address of the connections
to $OTHERPC_IP from the true source address to [whatever is missing].

Since you are issuing a command to change the source address, why are
you surprised that the source address gets changed????

--
Ken
http://www.ke9nr.net/
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Fwd: SPEWS DOLTS "SneakyP", "Kevin!:?)", "WindsorFox" SPAM braodbandnewsgroup] !:?) Broadband 0 11-30-2005 01:04 AM
Re: SPEWS SLIMES "WindsorFox", "Kevin-!:?)", "Spin Dryer" get the cold shoulder at broadband ng! SneakyP Broadband 0 11-29-2005 10:46 PM
Attention Plus.net Re: SPEWS DOLTS "WindsorFox", "Kevin-!:?)", "SpinDryer" SPAM broadband newsgroup !:?) Broadband 0 11-28-2005 04:28 AM
Attention Plus.Net Re: SPEWS DOLTS "WindsorFox", "Kevin-!:?)", "SpinDryer" SPAM braodband newsgroup !:?) Broadband 0 11-28-2005 03:03 AM
"hotspot" or "hot spot", "wireless" or "wi-fi" or "wi fi" ? Nic O`Neill Wireless Internet 3 02-12-2004 07:42 AM



1 2 3 4 5 6 7 8 9 10 11