Red Hat Linux Fedora For Dummies [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Red Hat Linux Fedora For Dummies [Electronic resources] - نسخه متنی

Jon Hall

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید






Displaying Your Firewall Rules

After you configure your firewall, you naturally want to verify that the filtering rules are set up correctly. To display the firewall rules, follow these steps:



Open a GNOME Terminal emulator window, by right-clicking any empty portion of the desktop and selecting the New Terminal menu.



If you’re not already the root user, enter the su - command in the GNOME Terminal window.



Enter the root password and type this command to display the firewall rules:

iptables -L



After you complete these steps, you see the firewall-filtering rules displayed in the terminal window as follows (use the verbose -v option in the preceding command to display extra information, including the network interfaces — for the sake of brevity, we don’t use the option in this example):

Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh stateNEW,ESTABLISHED
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED

The first chain, INPUT, is for incoming packets. You can see that the default policy is to deny all packets. The first rules in the INPUT chain direct iptables to allow all internal packets on the logical loopback (lo); many programs use the internal (lo) network to communicate with each other. The second rule allows the return packets, RELATED and ESTABLISHED, from outgoing connections to come back in. The last rule, which is optional, allows the incoming Secure Shell connections to your computer.

The next chain, FORWARD, denies all packets from being forwarded through your Linux computer. Forwarding is necessary only if you use your computer for routing or other advanced networking functions.

The last chain, OUTPUT, defines which IP packets are allowed out of your computer. Again, the first rule allows unlimited traffic through the loopback (lo) interface. The second and last rule allows any and all packets to leave your firewall.

The following section describes how to save the rules you just created and displayed so that they can be started automatically.

/ 194