Linux Netfilter discussions
 help / color / mirror / Atom feed
* "Lending an internet connection"
@ 2002-09-28 18:35 Sebastian Edman
  2002-09-28 19:14 ` Antony Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Edman @ 2002-09-28 18:35 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]


Hi,

I have a brother that has an internet connection with a static public IP (217.x.x.139). He is running windows and I want to place a linux-server at his house, and only take ports 22, 25 and 80 from him. The best way I can see to accomplish that is to place the linux-server between his computer (running windows) and his ISP, in such a way so that no change is neccessary on his computer.

ISP -------------- (eth0) Linux-server (eth1) -------------- (eth2) Windows machine

(eth2) is configured with the static public IP from the ISP (217.x.x.139) and has gateway 217.x.x.1 and DNS servers 212.x.x.2 and 212.x.x.3.

I run LFS (www.linuxfromscratch.org) on the linux-server and I consider my skills in iptables enough to write the rules. The problem is that I do not know how to tackle this problem. What IP addresses should I choose for the linux-server, and what IP addresses should I forward?

Thank you for your time...

Gratis e-mail resten av livet på: www.yahoo.se/mail
Busenkelt!

[-- Attachment #2: Type: text/html, Size: 1140 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "Lending an internet connection"
  2002-09-28 18:35 "Lending an internet connection" Sebastian Edman
@ 2002-09-28 19:14 ` Antony Stone
  2002-09-29 18:52   ` 'Lending an internet connection' Mitesh P Choksi
  0 siblings, 1 reply; 4+ messages in thread
From: Antony Stone @ 2002-09-28 19:14 UTC (permalink / raw)
  To: netfilter

On Saturday 28 September 2002 7:35 pm, Sebastian Edman wrote:

> Hi,
>
> I have a brother that has an internet connection with a static public IP
> (217.x.x.139). He is running windows and I want to place a linux-server at
> his house, and only take ports 22, 25 and 80 from him. The best way I can
> see to accomplish that is to place the linux-server between his computer
> (running windows) and his ISP, in such a way so that no change is
> neccessary on his computer.
>
> ISP ------- (eth0) Linux-server (eth1) ------- (eth2) Windows machine
>
> (eth2) is configured with the static public IP from the ISP (217.x.x.139)
> and has gateway 217.x.x.1 and DNS servers 212.x.x.2 and 212.x.x.3.
>
> I run LFS (www.linuxfromscratch.org) on the linux-server and I consider my
> skills in iptables enough to write the rules. The problem is that I do not
> know how to tackle this problem. What IP addresses should I choose for the
> linux-server, and what IP addresses should I forward?

I don't think you can do it.

You're trying to set up two machines, connected on a network, with only a 
single IP address.   There's no way they'd be able to communicate.

You can't put the public IP address 217.x.x.139 on eth0 because then eth1 
wouldn't talk to the Windows machine.

You can't put anything other than 217.x.x.139 on eth0 because then the ISP 
wouldn't talk to it.

You'll just have to put 217.x.x.139 onto eth0, put a private network between 
eth1 and the Windows machine, and do the standard NAT thing.....


Antony.

-- 

Anyone that's normal doesn't really achieve much.

 - Mark Blair, Australian rocket engineer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 'Lending an internet connection'
  2002-09-28 19:14 ` Antony Stone
@ 2002-09-29 18:52   ` Mitesh P Choksi
  2002-09-30 13:48     ` Antony Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Mitesh P Choksi @ 2002-09-29 18:52 UTC (permalink / raw)
  To: netfilter

Alternatively, use proxy arp on eth0 for the public IP and then put a host
route on the eth1.

eth0 will take up all ethernet packets due to the proxy arp.
routing table will route the packets to eth1 and subsequently to win machine.

proxy-arp howto and bridging howto could be answers to your setup.

Antony Stone said:
> On Saturday 28 September 2002 7:35 pm, Sebastian Edman wrote:
>
>> Hi,
>>
>> I have a brother that has an internet connection with a static public
>> IP (217.x.x.139). He is running windows and I want to place a
>> linux-server at his house, and only take ports 22, 25 and 80 from him.
>> The best way I can see to accomplish that is to place the linux-server
>> between his computer (running windows) and his ISP, in such a way so
>> that no change is neccessary on his computer.
>>
>> ISP ------- (eth0) Linux-server (eth1) ------- (eth2) Windows machine
>>
>> (eth2) is configured with the static public IP from the ISP
>> (217.x.x.139) and has gateway 217.x.x.1 and DNS servers 212.x.x.2 and
>> 212.x.x.3.
>>
>> I run LFS (www.linuxfromscratch.org) on the linux-server and I
>> consider my skills in iptables enough to write the rules. The problem
>> is that I do not know how to tackle this problem. What IP addresses
>> should I choose for the linux-server, and what IP addresses should I
>> forward?
>
> I don't think you can do it.
>
> You're trying to set up two machines, connected on a network, with only
> a  single IP address.   There's no way they'd be able to communicate.
>
> You can't put the public IP address 217.x.x.139 on eth0 because then
> eth1  wouldn't talk to the Windows machine.
>
> You can't put anything other than 217.x.x.139 on eth0 because then the
> ISP  wouldn't talk to it.
>
> You'll just have to put 217.x.x.139 onto eth0, put a private network
> between  eth1 and the Windows machine, and do the standard NAT
> thing.....
>
>
> Antony.
>
> --
>
> Anyone that's normal doesn't really achieve much.
>
> - Mark Blair, Australian rocket engineer




Regards,

Cyberdude Murli
The Earth




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 'Lending an internet connection'
  2002-09-29 18:52   ` 'Lending an internet connection' Mitesh P Choksi
@ 2002-09-30 13:48     ` Antony Stone
  0 siblings, 0 replies; 4+ messages in thread
From: Antony Stone @ 2002-09-30 13:48 UTC (permalink / raw)
  To: netfilter

On Sunday 29 September 2002 7:52 pm, Mitesh P Choksi wrote:

> Alternatively, use proxy arp on eth0 for the public IP and then put a host
> route on the eth1.
>
> eth0 will take up all ethernet packets due to the proxy arp.
> routing table will route the packets to eth1 and subsequently to win
> machine.
>
> proxy-arp howto and bridging howto could be answers to your setup.

That would allow him to forward *all* packets through the Linux machine to 
the Windows machine, but he wants to keep TCP port 22, 25 and 80 on the Linux 
machine....

How would he keep those protocols on the Linux box and send everything else 
through to the Windows box ?

How would the Linux box be able to reply to the external clients ?   What 
'real' IP address would he use on eth0, alongside the proxy arp for the 
public IP we're talking about ?

Antony.

-- 

How I want a drink, alcoholic of course, after the heavy chapters
involving quantum mechanics.

 - 3.14159265358979


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-30 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-28 18:35 "Lending an internet connection" Sebastian Edman
2002-09-28 19:14 ` Antony Stone
2002-09-29 18:52   ` 'Lending an internet connection' Mitesh P Choksi
2002-09-30 13:48     ` Antony Stone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox