Re: Open a range of ports with iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



redhatdude@xxxxxxxxxxxxx a écrit :
> Hi,
> That didn't help much.
> Thanks anyway Mr. Patte
> Can anyone give me the complete command to open those range of ports  in
> the firewall?

/sbin/iptables -A OUTPUT -o ppp0 -p tcp --dport 21 -m state --state
NEW,ESTABLISHED -j ACCEPT

/sbin/iptables -A INPUT -i ppp0 -p tcp  --sport 21 -m state --state
ESTABLISHED -j ACCEPT

/sbin/iptables -A OUTPUT -o ppp0 -p tcp --dport 20 -m state --state
NEW,ESTABLISHED -j ACCEPT

/sbin/iptables -A INPUT -i ppp0 -p tcp  --sport 20 -m state --state
ESTABLISHED,RELATED -j ACCEPT

/sbin/iptables -A OUTPUT -o ppp0 -p tcp --sport 1024:65535 --dport
1024:65535 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

/sbin/iptables -A INPUT -i ppp0 -p tcp --sport 1024:65535 --dport
1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT

Each "double" line is in fact a single line.

Here, the range is not the one you want, but you can modify.

and, I insist, use man iptables, to fit exactly want you want, my
example, is for my use, this not perhaps what you want (input
connections are forbidden with these rules, only output and the answer
of a remote server is allowed).

> On May 29, 2006, at 3:05 AM, François Patte wrote:
> 
>> redhatdude@xxxxxxxxxxxxx a écrit :
>>
>>> Hello,
>>> I'd like to know what is the command to open a range of ports, let's
>>> say I wanna open from port 3000 to port 3100 for ftp transfers.
>>
>>
>> source ports: --sport 3000:3100
>>
>> destination ports: --dport 3000:3100
>>
>>> Thanks,
>>
>>
>> man iptables
>>
>> -- 
>> François Patte
>> UFR de mathématiques et informatique
>> Université René Descartes
>> http://www.math-info.univ-paris5.fr/~patte
>>
>> -- 
>> fedora-list mailing list
>> fedora-list@xxxxxxxxxx
>> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> 
> 
> 


-- 
François Patte
UFR de mathématiques et informatique
Université René Descartes
http://www.math-info.univ-paris5.fr/~patte

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux