Re: about iptables



On 27 Apr 2006 17:28:00 -0700, "ParTizan" <ParTizanPuPkin@xxxxxxxxx> wrote:

thanks! but , do I really need all these settings?
as you can see , I'm already behind my router.

Assuming you reply to me (pls quote context in replies), start with:

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -p all --match state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p all -i lo -j ACCEPT

for standalone (single box + modem) operation.

Those lines basically allow output from box, but only expected
(requested) traffic can come back into the box. I suggest you
add some OUTPUT logging for debug, perhaps:

iptables -A OUTPUT -p all -o eth0 -j LOG --log-level info \
--log-prefix "fw_out: "

"--log-level info" sends to /var/log/messages, do a tail -f on the log
to watch the thing in action.

Grant.
--
Memory fault -- brain fried
.



Relevant Pages

  • Re: about iptables
    ... I'm already behind my router. ... Assuming you reply to me (pls quote context in replies), ... iptables -P FORWARD DROP ...
    (comp.os.linux.networking)
  • Re: Internet Connect of FC6..
    ... I was just borrowing a co-workers' ADSL internet connection to get some updates and get XGL working... ... Please see to it that iptables is ... I can recommend the router as a GP solution that will give you a much ...
    (Fedora)
  • Re: internet sharing question
    ... tools that will do all the iptables stuff for you. ... Let's assume that eth0 is the interface pointing to the internet, ... same subnet as the eth1 interface on your router box. ... $MODPROBE iptable_filter ...
    (linux.redhat)
  • iptables and masquerading: how to allow vpnc from lan
    ... I am running an old computer as a router using Debian Sarge and kernel ... IP masquerading) running iptables and doing masquerading. ... able to connect to an external VPN serverusing a VPN ...
    (Debian-User)
  • Re: iptables and masquerading: how to allow vpnc from lan
    ... > I am running an old computer as a router using Debian Sarge and kernel ... > IP masquerading) running iptables and doing masquerading. ... > able to connect to an external VPN serverusing a VPN ...
    (Debian-User)