[+] debian router a neostrada

Masz problemy z siecią bądź internetem? Zapytaj tu
setefirst
Posty: 9
Rejestracja: 13 września 2008, 13:45

[+] debian router a neostrada

Post autor: setefirst »

Witam. Muszę zbudować małą sieć w domu z dostępem do internetu. Będzie ona składała się z 3 komputerów. (1-Debian 2,3 - Windows XP) w kompie z Debianem mam 3 sieciówki) i moje zasadnicze pytanie to czy to będzie działać:

neostrada<->routerADSL<->debian(router-serwer)<----->komp1
|
-------------------------->komp2
męczę się już jakiś czas i neta na komputerach z Windows XP nie ma
pingi dochodzą.

Chyba wszystko psuje ten router ADSL.
Proszę o jakąś poradę
thalcave
Junior Member
Posty: 526
Rejestracja: 03 maja 2007, 19:57
Lokalizacja: gdynia

Post autor: thalcave »

A jak masz iptables skonfigurowanego?
setefirst
Posty: 9
Rejestracja: 13 września 2008, 13:45

Post autor: setefirst »

plik: /etc/network/interfaces:

Kod: Zaznacz cały

auto eth0
iface eth0 inet dhcp


auto eth2

iface eth2 inet static
address 10.0.0.1
netmask 255.255.255.0

auto eth1
iface eth1 inet static
address 10.0.1.1
netmask 255.255.255.0

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iptables: /etc/init.d/firee

Kod: Zaznacz cały

#! /bin/bash

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -F
iptables -X
iptables -t nat -X
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A FORWARD -o lo -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -j MASQUERADE
goofy
Posty: 96
Rejestracja: 06 września 2008, 12:01

Post autor: goofy »

A DNSy ustawione? Na zewnątrz pingi wychodzą?
setefirst
Posty: 9
Rejestracja: 13 września 2008, 13:45

Post autor: setefirst »

Tzn dns'y są ustawione na routerze ADSL i pingi z Debiana wychodzą na świat, a z komputerów w Lanie niestety nie.

A to mi zwraca iptables -L

Kod: Zaznacz cały

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     0    --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     0    --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Dlaczego prot jest = 0?
borlus
Beginner
Posty: 299
Rejestracja: 08 stycznia 2008, 14:27
Lokalizacja: okolice Poznania

Post autor: borlus »

A nie lepiej byłoby podpiąć kompy bezpośrednio do routera zamiast przez Debiana udostępniać?
setefirst
Posty: 9
Rejestracja: 13 września 2008, 13:45

Post autor: setefirst »

Lepiej ale mam zrobić projekt na Debianie (router + firewall) i w tym cały ból.
Przepraszam, że o tym nie wspomniałem.
borlus
Beginner
Posty: 299
Rejestracja: 08 stycznia 2008, 14:27
Lokalizacja: okolice Poznania

Post autor: borlus »

Jesteś pewien, że dobre adresy IP kompów z XP podajesz?
setefirst
Posty: 9
Rejestracja: 13 września 2008, 13:45

Post autor: setefirst »

raczej tak
_________
Debian-------|-----komp
10.0.1.1<----|---->10.0.1.2
10.0.0.1<----|----->10.0.0.2
__________|

Całą sieć obrazuje załącznik
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Przeanalizuj sobie takie rozwiązanie:
http://night.jogger.pl/2007/10/14/mala- ... tem-linux/
ODPOWIEDZ