All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brian" <blanda@mnsi.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Firewall Question?
Date: Sun, 14 Apr 2002 14:21:30 +0000	[thread overview]
Message-ID: <marc-lartc-101879409031186@msgid-missing> (raw)


I have a iptables firewall version 1.2.5, I LOVE IPTABLES SO MUCH MORE
THINGS YOU CAN DO. I have a small network off my eth0 interface
192.168.0.X network and my ppp0 is my DSL connection, with the current
firewall how would I block someone going to the Internet from my eth0
interface. I have tried many of things here and had no luck.

Both my INPUT and OUTPUT used a DROP policy by default and I am using
NAT to route my traffic to the Internet.



echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
echo 1 > /proc/sys/net/ipv4/conf/all/log_martians
echo "32768 61000" > /proc/sys/net/ipv4/ip_local_port_range
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 2400 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
echo 0 > /proc/sys/net/ipv4/tcp_sack

modprobe ip_conntrack
modprobe ip_tables
modprobe iptable_filter
modprobe iptable_mangle
modprobe iptable_nat
modprobe ipt_LOG
modprobe ipt_REJECT
modprobe ipt_MASQUERADE
modprobe ip_conntrack_ftp
modprobe ipt_owner
modprobe ip_conntrack_irc
 
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0  -j MASQUERADE
iptables -A FORWARD  -j ACCEPT


iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -j ACCEPT
iptables -A INPUT -i ppp0 -p udp     --dport 1024: -j ACCEPT
iptables -A INPUT -i ppp0 -p udp     --sport 67 --dport 68    -j ACCEPT
iptables -A INPUT -i ppp0 -p udp -s 208.188.197.4 --sport 53 --dport
1024:65535 -j ACCEPT iptables -A INPUT -i ppp0 -p udp -s 206.148.122.8
--sport 53 --dport 1024:65535 -j ACCEPT 
iptables -A INPUT -i ppp0 -p udp -s 206.148.122.2 --sport 53 --dport
1024:65535 -j ACCEPT iptables -A INPUT -i ppp0 -p tcp ! --syn -j ACCEPT
iptables -A INPUT -i ppp0 -p icmp -j DROP iptables -P INPUT DROP



iptables  -A  OUTPUT -d 192.168.0.0/24  -j ACCEPT
iptables  -A  OUTPUT -d 255.255.255.255 -j ACCEPT
iptables  -A  OUTPUT -d 127.0.0.1 -j ACCEPT
iptables  -P  OUTPUT DROP







_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2002-04-14 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-14 14:21 Brian [this message]
2002-04-14 16:14 ` [LARTC] Firewall Question? Ross Skaliotis
2002-04-14 17:49 ` Greg Scott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-101879409031186@msgid-missing \
    --to=blanda@mnsi.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.