Добрый день.
Есть арендодатель со своею сетью 192.168.0.0/24 раздаёт арендаторам Интернет по ppp. У арендатора altlinux c двумя сетевухами eth0 смотрит в сеть арендодателя eth1 в свою локальную сеть 192.168.90.0/24
У арендодатель стоит DHCP сервер и раздает ip. Проблема в том, что DHCP запросы проскакивают через linux в локалку 192.168.90.0 и не могу их никак зарубить. Помогите решить проблему.
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:87:7C:24
inet addr:192.168.0.251 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5052 errors:2 dropped:9 overruns:2 frame:0
TX packets:2519 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2085235 (1.9 MiB) TX bytes:373968 (365.2 KiB)
Interrupt:9 Base address:0xaf00
eth1 Link encap:Ethernet HWaddr 00:80:48:4E:39:D4
inet addr:192.168.90.100 Bcast:192.168.90.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3442 errors:0 dropped:0 overruns:0 frame:0
TX packets:2491 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:444319 (433.9 KiB) TX bytes:1857480 (1.7 MiB)
Interrupt:5 Base address:0xce00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1219 errors:0 dropped:0 overruns:0 frame:0
TX packets:1219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:201876 (197.1 KiB) TX bytes:201876 (197.1 KiB)
ppp1 Link encap:Point-to-Point Protocol
inet addr:192.168.111.61 P-t-P:192.168.111.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:2444 errors:0 dropped:0 overruns:0 frame:0
TX packets:2068 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1759054 (1.6 MiB) TX bytes:216680 (211.6 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
iptables-save
# Generated by iptables-save v1.4.5 on Fri Jun 3 13:15:03 2011
*mangle
:PREROUTING ACCEPT [12461:5108667]
:INPUT ACCEPT [9189:3414759]
:FORWARD ACCEPT [2775:1595894]
:OUTPUT ACCEPT [7108:1535152]
:POSTROUTING ACCEPT [10016:3157806]
COMMIT
# Completed on Fri Jun 3 13:15:03 2011
# Generated by iptables-save v1.4.5 on Fri Jun 3 13:15:03 2011
*nat
:PREROUTING ACCEPT [1369:169571]
:POSTROUTING ACCEPT [522:35518]
:OUTPUT ACCEPT [522:35518]
-A PREROUTING -i eth1 -p tcp -m tcp --dport 70 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -s 192.168.133.133/32 -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A PREROUTING -i eth0 -p tcp -m tcp --dport 1234 -j DNAT --to-destination 192.168.90.16:1234
-A POSTROUTING -s 192.168.90.0/24 -o ppp1 -j SNAT --to-source 192.168.111.61
COMMIT
# Completed on Fri Jun 3 13:15:03 2011
# Generated by iptables-save v1.4.5 on Fri Jun 3 13:15:03 2011
*filter
:INPUT ACCEPT [643:64465]
:FORWARD ACCEPT [180:26079]
:OUTPUT ACCEPT [653:59725]
-A INPUT -f -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -j ULOG --ulog-prefix "icount" --ulog-cprange 48 --ulog-qthreshold 50
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 67 -j DROP
-A INPUT -d 255.255.255.255/32 -i eth0 -p tcp -m tcp --sport 68 --dport 67 -j DROP
-A INPUT -d 255.255.255.255/32 -i eth0 -p tcp -m tcp --sport 67 --dport 68 -j DROP
-A INPUT -d 255.255.255.255/32 -i eth0 -p udp -m udp --sport 68 --dport 67 -j DROP
-A INPUT -d 255.255.255.255/32 -i eth0 -p udp -m udp --sport 67 --dport 68 -j DROP
-A INPUT -i eth0 -p udp -m pkttype --pkt-type broadcast -j DROP
-A INPUT -i eth0 -p icmp -j ACCEPT
-A INPUT -s 192.168.133.133/32 -i eth0 -j ACCEPT
-A INPUT -i ppp1 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -i ppp1 -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -i ppp1 -p tcp -m tcp --dport 1194 -j ACCEPT
-A INPUT -i ppp1 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i ppp1 -p udp -m udp --dport 22 -j ACCEPT
-A INPUT -i ppp1 -p icmp -j ACCEPT
-A INPUT -i ppp1 -j DROP
-A INPUT -d 192.168.90.0/24 -i eth0 -p tcp -m tcp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -d 192.168.90.0/24 -i eth0 -p udp -m udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -s 192.168.0.0/24 -i eth1 -p udp -m udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -f -j DROP
-A FORWARD -i eth1 -p tcp -m tcp --dport 139 -j DROP
-A FORWARD -i eth1 -p udp -m udp --sport 137 --dport 137 -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j ULOG --ulog-prefix "fcount" --ulog-cprange 48 --ulog-qthreshold 50
-A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
-A FORWARD -i ppp1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i ppp1 -j DROP
-A OUTPUT -o eth0 -p udp -m udp --dport 68 -j DROP
-A OUTPUT -d 192.168.133.133/32 -j ACCEPT
-A OUTPUT -d 192.168.133.166/32 -j ACCEPT
-A OUTPUT -f -j DROP
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j ULOG --ulog-prefix "ocount" --ulog-cprange 48 --ulog-qthreshold 50
COMMIT
# Completed on Fri Jun 3 13:15:03 2011
Наблюдаю пакеты DHCP прошедшие на внутренний интерфейс
# tcpdump -nn -i eth1|grep DHCP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
11:40:29.282730 IP 192.168.0.252.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:c1:28:01:1d:0a, length 325
11:40:29.328672 IP 192.168.0.4.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
11:40:30.671596 IP 192.168.0.182.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:36:21:62:7f, length 300
11:40:34.659310 IP 192.168.0.182.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:16:36:21:62:7f, length 300
11:41:09.059280 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:1e:33:5e:ab:5d, length 300
11:41:09.345986 IP 192.168.0.4.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
11:41:09.391044 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:1e:33:5e:ab:5d, length 306
11:41:09.428857 IP 192.168.0.4.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
11:41:17.906638 IP 192.168.0.140.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:25:22:6f:12:95, length 300
11:41:21.759323 IP 192.168.0.136.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:1e:33:5e:ab:5d, length 300
11:41:24.744830 IP 192.168.0.136.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:1e:33:5e:ab:5d, length 300
11:41:29.298717 IP 192.168.0.252.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:c1:28:01:1d:0a, length 325
11:41:29.329061 IP 192.168.0.4.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300