Iptables problem

Reindl Harald h.reindl at thelounge.net
Sat Mar 9 13:40:44 UTC 2013



Am 09.03.2013 14:29, schrieb davidschaak1 at mobilicity.blackberry.com:
> Sorry about the last post. New phone and I am not used to sending emails from it.
> Command line: iptables -A INPUT -p tcp -dport 20 -j ACCEPT results in error Bad argument 20

fix your typos

WRONG:   iptables -A INPUT -p tcp -dport 20 -j ACCEPT
CORRECT: iptables -A INPUT -p tcp --dport 20 -j ACCEPT

but my explanation why active FTP is generally wrong still
is correct from the first reply
_______________________

[root at srv-rhsoft:~]$ cat /scripts/iptables.sh | grep dport
$IPTABLES -A INPUT -p udp --sport 67 --dport 68 -j ACCEPT
$IPTABLES -A OUTPUT -p udp --sport 68 --dport 67 -j ACCEPT
$IPTABLES -A INPUT ! -i lo -p tcp -m conntrack --ctstate NEW --dport 0 -j DROP
$IPTABLES -A INPUT ! -i lo -p udp -m conntrack --ctstate NEW --dport 0 -j DROP
$IPTABLES -A INPUT -m conntrack --ctstate RELATED -m helper --helper ftp -p tcp --dport 10000:10100 -j ACCEPT
 $IPTABLES -A FORWARD -i eth1 -p tcp -m conntrack --ctstate NEW --dport 0 -j DROP
 $IPTABLES -A FORWARD -i eth1 -p udp -m conntrack --ctstate NEW --dport 0 -j DROP
 $IPTABLES -A INPUT -p tcp --sport 1024: -s $RHSOFT_TESTSERVER --dport 25 -j ACCEPT
$IPTABLES -A INPUT -p tcp -s $LAN_RHSOFT,$LAN_LOUNGE,$WAN_LOUNGE --dport 8000 -m conntrack --ctstate NEW --syn -j
ACCEPT
$IPTABLES -A INPUT -p tcp --sport 1024: -s $LAN_RHSOFT,$LAN_LOUNGE --dport $AVAHI_PORT -m conntrack --ctstate NEW
--syn -j ACCEPT
$IPTABLES -A INPUT -p udp --sport 1024: -s $LAN_RHSOFT,$LAN_LOUNGE --dport $AVAHI_PORT -m conntrack --ctstate NEW
-j ACCEPT
$IPTABLES -A INPUT -p udp -s $LAN_RHSOFT,$LAN_LOUNGE,$RHSOFT_ARRAKIS,$RHSOFT_TESTSERVER --sport 1024: --dport 123
-j ACCEPT
$IPTABLES -A INPUT -p tcp --sport 1024: -s $OFFICE_VPN_IP,$RHSOFT_VPN_IP,$ESX1_MASTER,$OPENVAS --dport 3306 -m
conntrack --ctstate NEW --syn -j ACCEPT
 $IPTABLES -A INPUT -p udp --sport 1024: -s $WAN_LOUNGE,$LAN_LOUNGE,$LAN_RHSOFT --dport 53 -j ACCEPT
 $IPTABLES -A INPUT -p tcp --sport 1024: -s $WAN_LOUNGE,$LAN_LOUNGE,$LAN_RHSOFT --dport 53 -j ACCEPT


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20130309/adb5961e/attachment.sig>


More information about the users mailing list