В оригинальном скрипте нет никаких x.x.x.x, вместо этого стоит внешний
ип.
3 сетевых интерфейса:
eth0 (
192.168.1.2/255.255.255.0)- АДСЛ модем, настроенный бриджем
eth1 (
192.168.2.2/255.255.255.0)- локальная сеть
ppp0 (x.x.x.x :) - интернет
1) [root@maki:~]#cat /etc/resolv.conf
nameserver 89.232.109.74
nameserver 78.138.135.10
2) [root@maki:~]#iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp
dpt:http
ACCEPT tcp -- anywhere anywhere tcp
dpt:ndmp
ACCEPT tcp -- anywhere anywhere tcp
dpt:ssh
ACCEPT all -- anywhere anywhere state
RELATED,ESTAB
LISHED
LOG tcp -- anywhere anywhere tcp
flags:FIN,SYN,A
CK/SYN LOG level debug tcp-options
REJECT tcp -- anywhere anywhere tcp
flags:FIN,SYN,A
CK/SYN reject-with icmp-port-unreachable
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT icmp --
192.168.2.0/24 anywhere
ACCEPT icmp -- anywhere
192.168.2.0/24
ACCEPT udp --
192.168.2.0/24 anywhere udp
dpt:domain
ACCEPT udp -- anywhere
192.168.2.0/24 udp
spt:domain
ACCEPT tcp --
192.168.2.0/24 anywhere
ACCEPT tcp -- anywhere
192.168.2.0/24
ACCEPT all --
192.168.2.0/24 anywhere
ACCEPT all -- anywhere
192.168.2.0/24
DROP tcp -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
3) [root@maki:~]#ping
www.google.ru
PING
www.l.google.com (72.14.221.104) 56(84) bytes of data.
64 bytes from
fg-in-f104.google.com (72.14.221.104): icmp_seq=1
ttl=234 time=107 ms
64 bytes from
fg-in-f104.google.com (72.14.221.104): icmp_seq=2
ttl=234 time=106 ms
64 bytes from
fg-in-f104.google.com (72.14.221.104): icmp_seq=3
ttl=234 time=104 ms
....
---
www.l.google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 104.410/105.662/107.038/0.800 ms
4) [root@maki:~]#ping 81.222.201.1
PING 81.222.201.1 (81.222.201.1) 56(84) bytes of data.
64 bytes from
81.222.201.1: icmp_seq=1 ttl=241 time=51.6 ms
64 bytes from
81.222.201.1: icmp_seq=2 ttl=241 time=51.8 ms
64 bytes from
81.222.201.1: icmp_seq=3 ttl=241 time=51.6 ms
--- 81.222.201.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 51.620/51.709/51.862/0.284 ms
5) [root@maki:~]#wget
www.google.ru -O /dev/null
--15:16:10--
http://www.google.ru/
Распознаётся www.google.ru... 72.14.221.103, 72.14.221.147,
72.14.221.99, ...
Устанавливается соединение с
www.google.ru|72.14.221.103|:80... сбой:
Время ожидания соединения истекло.
Устанавливается соединение с
www.google.ru|72.14.221.147|:80...
Это вылезло через 2-3 минуты ожидания, потом нажал ctrl+c ...
6) [root@maki:~]#nmap
www.google.ru
Starting Nmap 4.20 (
http://insecure.org ) at 2009-02-25 15:26 MSK
Warning: Hostname
www.google.ru resolves to 4 IPs. Using
72.14.221.147.
sendto in send_ip_packet: sendto(5, packet, 44, 0, 72.14.221.147, 16)
=> Operation not permitted
Offending packet: TCP
78.138.132.29:45681 >
72.14.221.147:80 S ttl=51
id=47318 iplen=44 seq=448468862 win=4096 <mss 1460>
sendto in send_ip_packet: sendto(5, packet, 44, 0, 72.14.221.147, 16)
=> Operation not permitted
Offending packet: TCP
78.138.132.29:45682 >
72.14.221.147:21 S ttl=38
id=55477 iplen=44 seq=448403327 win=3072 <mss 1460>
sendto in send_ip_packet: sendto(5, packet, 44, 0, 72.14.221.147, 16)
=> Operation not permitted
Offending packet: TCP
78.138.132.29:45682 >
72.14.221.147:256 S ttl=39
id=10175 iplen=44 seq=448403327 win=4096 <mss 1460>
sendto in send_ip_packet: sendto(5, packet, 44, 0, 72.14.221.147, 16)
=> Operation not permitted
Offending packet: TCP
78.138.132.29:45682 >
72.14.221.147:80 S ttl=58
id=27028 iplen=44 seq=448403327 win=3072 <mss 1460>
sendto in send_ip_packet: sendto(5, packet, 44, 0, 72.14.221.147, 16)
=> Operation not permitted
...
Omitting future Sendto error messages now that 10 have been shown.
Use -d2 if you really want to see them.
On 24 фев, 20:23, Night Nord <
nightn...@gmail.com> wrote:
> x.x.x.x в скрипте - это гениально, браво.
>
> Че за ип у сервера? Структура сети (внутреняя сеть, внешняя, полные ипы с
> маской)?
>
> Ф студию:
>
> 1) /etc/resolv.conf
>
> 2) iptables --list (без крестиков)
>
> 3)
pingwww.google.ru(копипастом. а не пересказом)
>
> 4) ping 81.222.201.1 (копипастом)
>
> 5) wgetwww.google.ru-O /dev/null (копипаст чего пишет)