RE: [Linux-guvenlik] iptables acil

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ayhan HACIOĞLU (ayhanhacioglu@sanovel.com.tr)
Date: Fri 28 Jan 2005 - 14:21:44 EET


İptables -t nat -nL PREROUTING --line-numbers komutu ile nameresolv etmesini beklemeden rule numaralarını da görebilirsiniz. Sanırım aşağıdaki gibi bir rule kullandınız.

Örn :

İptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination 192.168.1.3:3389

Birde Log lamayı deneyerek 212.58.15.59 ip e gelen 3389 tcp istelerini görerek daha iyi oluşturulmasını sağlayacktır.

İptables -t nat -A PREROUTING -j LOG --log-prefix "DPT=3389 "

-----Original Message-----
From: esat yasar caglayan [mailto:esat@vitel.com.tr]
Sent: Wednesday, January 12, 2005 1:49 PM
To: linux-guvenlik@liste.linux.org.tr
Subject: [Linux-guvenlik] iptables acil

Arkadaşlar iyi çalışmalar

İptables ile çift ethernetli bir makine üzerinden ön tarafta ADSL ile
internete çıkış veriyorum. Iç blok 192.168.1.0 bloğu ADSL olan taraf
bloğu ie 212.58.15.56 /29 bloğu linux makinenin ip iç ip si 192.168.1.1
dış ip si ise 212.58.15.58 bu noktadan ADSL e bağlı 212.58.15.56/29
bloğu aslında real değil daha önceden ISP üzerinden çıkış vardı şimdi
kendi iç ipleri gibi oldu.

İçteki makinelerden 192.168.1.3 212.58.15.59 ip sine natladım. Daha
sonra ADSL üzerinden 3389 nolu porta gelen istekleri 212.58.15.59 ip
sine NAT yapıyorum fakat terminal service ile içeriye erişemiyorum.
Cihazın iki etherneti arasında ip forwarding var aşağıda bazı komut
çıktılarını gönderiyorum bunun için çözümü olan var mı çok teşekkürler

[root@mail root]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT all -- anywhere 212.58.15.59
to:192.168.1.3
DNAT all -- anywhere 212.58.15.60
to:192.168.1.254

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 192.168.1.3 anywhere
to:212.58.15.59
SNAT all -- 192.168.1.254 anywhere
to:212.58.15.60
SNAT all -- anywhere anywhere
to:212.58.15.58

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

UW PICO(tm) 4.2 File:
/proc/net/snmp

Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors
ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDi$
Ip: 1 64 13564 0 0 1859 0 0 11448 12855 1 0 0 0 0 0 0 0 0
Icmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs
InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampRe$
Icmp: 7 0 7 0 0 0 0 0 0 0 0 0 0 10 0 8 0 0 0 2 0 0 0 0 0 0
Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens
AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InEr$
Tcp: 0 0 0 0 295 389 0 0 1 11004 12197 8 0 10
Udp: InDatagrams NoPorts InErrors OutDatagrams
Udp: 632 7 0 649

[root@mail root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
212.58.15.56 * 255.255.255.248 U 0 0 0
eth1
192.168.50.0 192.168.1.254 255.255.255.0 UG 0 0 0
eth0
192.168.2.0 192.168.1.254 255.255.255.0 UG 0 0 0
eth0
192.168.1.0 * 255.255.255.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default 212.58.15.57 0.0.0.0 UG 0 0 0
eth1

[root@mail root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:08:A1:4C:87:D6
          inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:3602 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4577 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1783 txqueuelen:100
          RX bytes:331974 (324.1 Kb) TX bytes:3823792 (3.6 Mb)
          Interrupt:11 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:0D:61:2D:F0:FB
          inet addr:212.58.15.58 Bcast:212.58.15.63
Mask:255.255.255.248
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2934 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1131100 (1.0 Mb) TX bytes:344709 (336.6 Kb)
          Interrupt:11 Base address:0x7000

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:9434 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9434 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1602785 (1.5 Mb) TX bytes:1602785 (1.5 Mb)

_______________________________________________
Linux-guvenlik mailing list
Linux-guvenlik@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-guvenlik

_______________________________________________
Linux-guvenlik mailing list
Linux-guvenlik@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-guvenlik


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.