با سلام با اساتید محترم
من اکانتینگ ISPUtil دارم و از طریق یک روتر 2610 کاربران را به اینترنت وصل می کنم حالا می خوام بعضی از سایتها را روی روتر ببندم اگر می شه راهنمایی کنید چطور می شه مثلا یک سایت یا یک آدرس Ip را بست.
ممنون
Printable View
با سلام با اساتید محترم
من اکانتینگ ISPUtil دارم و از طریق یک روتر 2610 کاربران را به اینترنت وصل می کنم حالا می خوام بعضی از سایتها را روی روتر ببندم اگر می شه راهنمایی کنید چطور می شه مثلا یک سایت یا یک آدرس Ip را بست.
ممنون
[RIGHT]باید از ACL استفاده کنید مثلا برای بستن[B] ip خاص[/B] :
[LEFT]access-list 110 deny tcp any host [B]137.14.156.10[/B]
[RIGHT]درباره ACL همه چیز تو این سایت هست . بگرد، پیدا نکردی بگو .
[/RIGHT]
[/LEFT]
[/RIGHT]
سلام
باید از ACL استفاده کنید
خوب دوستان عزیز با تشکر از شما ولی من دستور فوق را زدم ولی آدرسی بسته نشد
آیا در ACL با ید دستورات دیگری هم بزنم یا نه
با تشکر
بعد از اینکه acl نوشتی باید اونو به یه interface نسبت بدی . مثلا اگه کاربرات از اینترفیس fa0/1 وارد روتر میشن باید بزنید :
[LEFT]Router(config)#int fa0/1
Router(config-if)#ip access-group 110 in
[RIGHT]بعد از این دستور روی ورودیها به این اینترفیس acl اعمال خواهد شد .
[/RIGHT]
[/LEFT]
سلام
البته در انتهای ACL باید دستور permit ip any any را هم بزاری، چون اگه نزاری، همه ترافیک ها drop میشن.
ks_habi عزیز به نظر میرسه شما حداقل در زمینه نوشتن acl تجربه زیادی نداری. حتما چند روز بعد هم میخوای acl رو edit کنی که باز به مشکل میخوری . پیشنهاد میکنم اول تو یه محیط آزمایشی یا با نرم افزاهایی مثل packet tracer خوب روی این قضیه مسلط شو . بعد اونو روی روترت پیاده کن . تا به مشکلات کمتری برخورد کنی .
[QUOTE=aliafzalan;268693]سلام
البته در انتهای ACL باید دستور permit ip any any را هم بزاری، چون اگه نزاری، همه ترافیک ها drop میشن.[/QUOTE]
قطعا .
با تشکر از دوست عزیز
من دستورات فوق را انجام دادم ولی با یک مشکل اساسی روبرو شدم وقتی دستور access-list 110 deny tcp any host [B]137.14.156.10 می نویسم و سپس در اینترفیس مورد نظر [/B]ip access-group 110 in را تایپ می کنم ارتباط کلا قطع می شه و دیگر هیچ سایتی وصل نمیشه جایی اشتباه کردم اگر می خوای کانفیگ را برات می زارم
ممنون
شما باید روی اینترفیس سمت شبکه داخلیتون این ACL را بزارید، در ضمن دستور توی پست شماره 6 را به انتهای ACL اضافه کردید دیگه، آره ؟؟
[RIGHT]با تشکر از دوست عزیز [/RIGHT]
آره اضافه کردم ارتباط دیگه قطه نشد ولی آدرسی که می خواستم ببندم بسته نشد. در ضمن به انتهای acl اضافه نشد ممکنه روی روتر 2610 اضافه نشه من یک خط جدید باز کردم و اونو اضافه کردم
[LEFT]interface FastEthernet0/0
ip address 172.17.15.1 255.255.0.0 secondary
ip address 192.168.15.1 255.255.255.0
ip access-group 110 in
ip nat inside
no ip mroute-cache
speed auto
half-duplex
no cdp enable
!
!
access-list 110 deny tcp any host [B]137.14.156.10[/B]
access-list 110 permit ip any any [/LEFT]
یکی به داد ما هم برسه این پست خیلی وقته بی جوابه،
من تمام راه هایی که تو پستها این سایت بود رو رفتم ولی جواب نگرفتم.
بالاخره یکی نیست درست بگه چطوری روی یک روتر 2610 می شه یک سایت و یک آی پی رو بست ؟؟
[CODE]
[LEFT]Step 1: Configure a DNS server
Let's say we want to block access to the creatively named www.badsite.com. We don't know the IP address, and we don't want to know it. That's fine—the Cisco IOS can look it up for us and fill it in.
To do this, we need at least one DNS server configured on the router. To configure a DNS server, use the ip name-server command. Here's an example:
Router(config)# ip name-server 1.1.1.1 2.2.2.2
In this case, we configured a primary and a backup DNS server for the router to use to resolve DNS names. This doesn't affect any traffic flowing through the router; the router will use these DNS servers when we ping a Web server by name. Here's an example:
Router# ping www.techrepublic.comTranslating "www.techrepublic.com"...domain server (1.1.1.1) [OK]Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 216.239.113.101, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 msRouter#
In this example, the router used the domain name server we specified (i.e., 1.1.1.1) to resolve the DNS name. It successfully translated the DNS name to 216.239.113.101.
If we hadn't already specified a DNS server, then the router would have returned something like the following:
Translating "www.techrepublic.com"...domain server (255.255.255.255)% Unrecognized host or address, or protocol not running.[/LEFT]
[B]Step 2: Create the ACL[/B]
[LEFT]To actually block the undesirable Web site, we need to create an access control list (ACL) to define exactly what we want to block. Here's an example:
Router(config)# access-list 101 deny tcp any host www.badsite.com eq wwwTranslating "www.badsite.com"...domain server (1.1.1.1) [OK]Router(config)# access-list 101 permit tcp any any eq www! to allow all other web traffic
This ACL denies all Web traffic from any source going to the specified Web site. After blocking that traffic, it will also allow all other Web traffic from any source to any destination. Finally, because of the implied deny, it will deny all other traffic.
What if you want to determine which IP addresses are trying to go to the blocked Web site? You can log this information using the log keyword. Here's an example:
Router(config)# access-list 101 deny tcp any host www.badsite.com eq www log[/LEFT]
[B]Step 3: Avoid this "gotcha"[/B]
[LEFT]Here's one issue to keep in mind. After we entered the first line of the ACL above, notice how the router used the DNS server to resolve the DNS name. It then replaced the IP address that the hostname resolved to in the ACL. Here's a closer look at the configuration:
Router# sh run | inc access-list 101access-list 101 deny tcp any host 66.116.109.62 eq www
This is a nice feature, but it can be problematic for a couple of reasons. First, the IP address entered is only the first IP address that the DNS server responded to. If this is a large Web site that has multiple servers (such as a search engine), the ACL only contains the first IP address that the DNS server responded with—you'll need to manually block the other IP addresses. Here's an example:
C:\> nslookup www.google.comServer: DNSSERVERAddress: 1.1.1.1Non-authoritative answer:Name: www.l.google.comAddresses: 64.233.167.104, 64.233.167.147, 64.233.167.99Aliases: www.google.com
In addition, if the IP address of the blocked Web server changes, your ACL will remain the same. You would need to manually update the ACL.[/LEFT]
[B]Step 4: Apply the ACL[/B]
[LEFT]Just because we've created the ACL doesn't mean the router is actually using it—we still have to apply the ACL. We created this ACL with the assumption that it's blocking traffic from our local LAN that's going out to the WAN (i.e., the Internet). That's because we formatted the ACL with source then destination.
Because of this design, we need to apply the ACL in the OUTBOUND direction on the router. Here's an example:
Router(config)# int serial 0/0Router(config-if)# ip access-group 101 out[/LEFT]
[/CODE]
این کانفیگ شما درسته
باید جواب بده
[QUOTE=ks_habi;268895][RIGHT]با تشکر از دوست عزیز [/RIGHT]
آره اضافه کردم ارتباط دیگه قطه نشد ولی آدرسی که می خواستم ببندم بسته نشد. در ضمن به انتهای acl اضافه نشد ممکنه روی روتر 2610 اضافه نشه من یک خط جدید باز کردم و اونو اضافه کردم
[LEFT]interface FastEthernet0/0
ip address 172.17.15.1 255.255.0.0 secondary
ip address 192.168.15.1 255.255.255.0
ip access-group 110 in
ip nat inside
no ip mroute-cache
speed auto
half-duplex
no cdp enable
!
!
access-list 110 deny tcp any host [B]137.14.156.10[/B]
access-list 110 permit ip any any [/LEFT][/QUOTE]
چه جوری تست میکنید میگید بسته نشده ؟ اصلا ip رو درست پیدا کردید ؟ ip (نه اسم) رو تو web browser تون بزنید ببینید چیزی باز میشه ؟
حواستون باشه با این acl هنوز ping اون ip بازه ها !
اگر همه چیز درست بود و سایت بازم بسته نبود (ممکنه acl رو پس و پیش نوشته باشی)، یه acl جدید بنویس ببین حل میشه که اگه نشه آخرش یهت میگم چیکار کنی !!!
برو تو int fa0/0 و با دستور no ip access-group 110 in قبلی رو از اینترفیست بردار .
بعد تو conf بنویس :
access-list 111 deny ip any host [B]137.14.156.10[/B]
access-list 111 permit ip any any
بعد برو روی int fa0/0 و دوباره اینو بنویس :
ip access-group 111 in
بعد اگه بازم بسته نشد ، کبریت رو روشن کن و بکش زیره روترت و سریع منطقه رو ترک کن .