Linux Netfilter discussions
 help / color / mirror / Atom feed
* problems on packets going out..
@ 2003-02-20  5:01 louie miranda
  0 siblings, 0 replies; only message in thread
From: louie miranda @ 2003-02-20  5:01 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

I have an iptables rule which block specific ports and specific icmp and all
udp.
Everything is successfully connected and i can retrieve data packets, but
when i add the last rule for my chain which is..

$IPTABLES -A INPUT -d $MYIP -s 0/0 -j REJECT

Yes its secure every port i have from 1 to 65000, but outgoing packets from
my server could not get out. Which is wrong? I'm attaching my rule if ever
you want to see it.

--
Thanks,
Louie...

[-- Attachment #2: creon-firewall.txt --]
[-- Type: text/plain, Size: 2933 bytes --]

#!/bin/bash

IPTABLES="/sbin/iptables"
MYIP="10.0.0.13"

$IPTABLES -F

### global rule for 193.35.207.34 ###
# $IPTABLES -A INPUT -d $MYIP -s 0/0 -j LOG
### end of global rule for 193.35.207.34 ###

### rule for udp ###
$IPTABLES -A INPUT -p udp -d $MYIP -j LOG
$IPTABLES -A INPUT -p udp -d 127.0.0.1 -s 127.0.0.1 -j ACCEPT
$IPTABLES -A INPUT -p udp -d $MYIP -s $MYIP -j ACCEPT
$IPTABLES -A INPUT -p udp -d $MYIP -s 10.0.0.11 -j ACCEPT # louie-pc
$IPTABLES -A INPUT -p udp -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable # drop the fucker ;)
### end of udp ###

### rule for icmp 8 ###
$IPTABLES -A INPUT -p icmp --icmp-type 8 -d $MYIP -j LOG
$IPTABLES -A INPUT -p icmp --icmp-type 8 -d 127.0.0.1 -s 127.0.0.1 -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 8 -d $MYIP -s $MYIP -j ACCEPT
$IPTABLES -A INPUT -p icmp --icmp-type 8 -d $MYIP -s 10.0.0.11 -j ACCEPT # louie-pc
$IPTABLES -A INPUT -p icmp --icmp-type 8 -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable
### end of icmp 8 ###

### rule for port 22 ###
$IPTABLES -A INPUT -p tcp --dport 22 -d $MYIP -j LOG
$IPTABLES -A INPUT -p tcp --dport 22 -d 127.0.0.1 -s 127.0.0.1 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 22 -d $MYIP -s $MYIP -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 22 -d $MYIP -s 10.0.0.11 -j ACCEPT # louie-pc
$IPTABLES -A INPUT -p tcp --dport 22 -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable # drop the fucker ;)
### end of port 22 ###

### rule for port 80 ###
$IPTABLES -A INPUT -p tcp --dport 80 -d $MYIP -j LOG
$IPTABLES -A INPUT -p tcp --dport 80 -d 127.0.0.1 -s 127.0.0.1 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 80 -d $MYIP -s $MYIP -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 80 -d $MYIP -s 10.0.0.11 -j ACCEPT # louie-pc
$IPTABLES -A INPUT -p tcp --dport 80 -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable # drop the fucker ;)
### end of port 80 ###

### rule for port 3306 ###
$IPTABLES -A INPUT -p tcp --dport 3306 -d $MYIP -j LOG
$IPTABLES -A INPUT -p tcp --dport 3306 -d 127.0.0.1 -s 127.0.0.1 -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 3306 -d $MYIP -s $MYIP -j ACCEPT
$IPTABLES -A INPUT -p tcp --dport 3306 -d $MYIP -s 10.0.0.11 -j ACCEPT # louie-pc
$IPTABLES -A INPUT -p tcp --dport 3306 -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable # drop the fucker ;)
### end of port 3306 ###

### misc rules ###
# $IPTABLES -A OUTPUT -p icmp -s 0/0 -d 10.0.0.13 -j ACCEPT
### end of misc rules ###

### output rules ###
$IPTABLES -A OUTPUT -p ALL -s $MYIP -j ACCEPT
### end of output rules ###

### forward rules ###
$IPTABLES -A FORWARD -i eth0 -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
### end of forward rules ###

### rule for deny all ###
$IPTABLES -A INPUT -d $MYIP -s 0/0 -j REJECT --reject-with icmp-net-unreachable # drop the fucker ;)
### end of deny all ###

#
# eof

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-20  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-20  5:01 problems on packets going out louie miranda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox