[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problemi di masquereding



ola a tutti,

ho la necessità di attuare il masquereding a casa, ho seguito l'how-to di pluto senza riscontrare nessun problema e infine ho attivato il "server" dhcp... ora eth0 è a scheda interna e eth1 e quella che da verso internet. eth0 è connessa a uno switch, l'altra macchina(1) che deve servirsi del masquereding e connessa anche lei allo switc, ora la macchina(1) quando fa il boot prende l'ip da dhcp ma poi non riesce a connettersi a internet.. vi posto il conf del dhcp, le regole di iptables + la tabella e la tabbela di route

/etc/dhcpd.conf:

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers  1.253.128.10,1.253.128.11;
option domain-name "mydomain.org";
subnet 192.168.1.0 netmask 255.255.255.0 {
       range 192.168.1.10 192.168.1.100;
       range 192.168.1.150 192.168.1.200;
}
i
#iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 1633 packets, 177K bytes)
pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 4 packets, 240 bytes)
pkts bytes target prot opt in out source destination 503 113K MASQUERADE all -- * eth1 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 676 packets, 150K bytes)
pkts bytes target prot opt in out source destination

regole di iptables:

modprobe ipt_MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT
iptables -P INPUT DROP
iptables -A FORWARD -i eth0 -o eth0 -j REJECT
iptables -F FORWARD
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state NEW -i ! eth0 -j ACCEPT

routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
1.255.128.0     *               255.255.248.0   U     0      0        0 eth1
default         1.255.128.1     0.0.0.0         UG    0      0        0 eth1


spero di avervi dato abbastanza informazioni... grazie mille..

R.

_________________________________________________________________
Filtri antispamming e antivirus per la tua casella di posta http://www.msn.it/msn/hotmail



Reply to: