"Lending an internet connection"
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!
Quoted 11 lines · Sebastian Edman
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
Quoted 7 lines
(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.
Signature · 3 lines
Anyone that's normal doesn't really achieve much. - Mark Blair, Australian rocket engineer
Re: 'Lending an internet connection'
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.
Quoted 39 lines · Antony Stone
Quoted 15 lines · Sebastian Edman
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.
Quoted 5 lines
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.....
Quoted 7 lines
Antony.
--
Anyone that's normal doesn't really achieve much.
- Mark Blair, Australian rocket engineer
Regards,
Cyberdude Murli
The Earth
Re: 'Lending an internet connection'
Quoted 8 lines · Mitesh P Choksi
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.
Signature · 4 lines
How I want a drink, alcoholic of course, after the heavy chapters involving quantum mechanics. - 3.14159265358979