Kod: Zaznacz cały
iptables -A INPUT -i eth1 -p UDP --dport 53 -j ACCEPT
Po tym wpisie nic się nie zmieniło.
Kod: Zaznacz cały
iptables -A INPUT -i eth1 -p UDP --dport 53 -j ACCEPT
Kod: Zaznacz cały
#!/bin/bash
iptables -F
iptables -F -t nat
iptables -F -t mangle
# ustawienie polityki dzialania
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
#wpuszczamy wszystko na interfejsie lokalnym
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A FORWARD -o lo -j ACCEPT
# polaczenia nawiazane
iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED
#dopuszczony ruch z sieci wewnętrznej
iptables -I INPUT -i eth1 -j ACCEPT
#dopuszczony ruch z sieci zewnętrznej
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT #ssh
iptables -A INPUT -i eth0 -p tcp --dport 21 -j ACCEPT #ftp
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT #www
iptables -A INPUT -p icmp -j ACCEPT #ping
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Kod: Zaznacz cały
route
Kod: Zaznacz cały
/etc/network/interfaces
Kod: Zaznacz cały
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.43.1
netmask 255.255.255.0
gateway 192.168.43.1
network 192.168.43.0
Proszę:ramsi1986 pisze:Podaj jeszcze wynik polecenia:Kod: Zaznacz cały
route
Kod: Zaznacz cały
Destination Gateway Genmask Flags Metric Ref Use Iface
88.200.100.0 * 255.255.255.0 U 0 0 0 eth0
192.168.43.0 * 255.255.255.0 U 0 0 0 eth1
default host-88-200-100 0.0.0.0 UG 0 0 0 eth0
default 192.168.43.1 0.0.0.0 UG 0 0 0 eth1
Kod: Zaznacz cały
route del default
route add default gw <twój zewnętrzny adres>
Kod: Zaznacz cały
ping numer ip
Kod: Zaznacz cały
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
88.200.100.0 * 255.255.255.0 U 0 0 0 eth0
192.168.43.0 * 255.255.255.0 U 0 0 0 eth1
Kod: Zaznacz cały
domain jjjj.pl
search jjjj.pl
nameserver 88.200.100.10
nameserver 88.200.100.11
Kod: Zaznacz cały
subnet 192.168.43.0 netmask 255.255.255.0 {
range 192.168.43.10 192.168.43.30;
option domain-name-servers 80.200.100.10 , 88.200.100.11;
option domain-name "jjjj.pl";
prepend domain-name-servers 88.200.100.11;
option routers 192.168.43.1;
option broadcast-address 192.168.43.255;
default-lease-time 86400;
max-lease-time 86400;
}
Kod: Zaznacz cały
# sieć 192.168.1.0/255.255.255.0
subnet 192.168.43.0 netmask 255.255.255.0 {
# domyślnie przydzielamy adresy 192.168.1.100-199:
#range 192.168.43.100 192.168.43.199;
range 192.168.43.10 192.168.43.199;
# na jeden dzień
default-lease-time 86400;
# poinformujmy że hosty będą korzystać z domeny ultra.net.pl
option domain-name "jjjj.pl";
# niech używają naszego routera jako serwera DNS:
option domain-name-servers 88.200.100.10;
option routers 192.168.43.1;
# i dodatkowe info:
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.43.255;
}
host pc {
hardware ethernet 00:16:E6 :D 9:00:00;
fixed-address 192.168.43.11;
}
host laptop {
hardware ethernet 00:0F:B0:A7:00:00;
fixed-address 192.168.43.12;
}
host wdtvlive {
hardware ethernet 00:90:A9:73:00:00;
fixed-address 192.168.43.13;
}
Kod: Zaznacz cały
May 15 18:39:22 wolf winbindd[1702]: [2011/05/15 18:39:22.660272, 0] winbindd/idmap_tdb.c:287(idmap_td$
May 15 18:39:22 wolf winbindd[1702]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incom$
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.501608, 0] winbindd/idmap.c:201(smb_register$
May 15 18:39:23 wolf winbindd[1702]: idmap_alloc module tdb already registered!
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.501676, 0] winbindd/idmap.c:149(smb_register$
May 15 18:39:23 wolf winbindd[1702]: Idmap module passdb already registered!
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.501710, 0] winbindd/idmap.c:149(smb_register$
May 15 18:39:23 wolf winbindd[1702]: Idmap module nss already registered!
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.501805, 0] winbindd/idmap_tdb.c:287(idmap_td$
May 15 18:39:23 wolf winbindd[1702]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incom$
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.502412, 0] winbindd/idmap.c:201(smb_register$
May 15 18:39:23 wolf winbindd[1702]: idmap_alloc module tdb already registered!
May 15 18:39:23 wolf winbindd[1702]: [2011/05/15 18:39:23.502466, 0] winbindd/idmap.c:149(smb_register$
May 15 18:39:23 wolf winbindd[1702]: Idmap module passdb already registered!
May 15 18:46:23 wolf winbindd[1702]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configuration