hope this will help..

...
INT0="eth0"
INT1="eth1"
IPT=/sbin/iptables

#deny ftp & telnet
$IPT -A INPUT -i $INT0 -s 0/0 -d 0/0 -p tcp --dport 21 -j DENY
$IPT -A INPUT -i $INT0 -s 0/0 -d 0/0 -p tcp --dport 23 -j DENY

#accept ftp & telnet
$IPT -A INPUT -i $INT1 -s 0/0 -d 0/0 -p tcp --dport 21 -j ACCEPT
$IPT -A INPUT -i $INT1 -s 0/0 -d 0/0 -p tcp --dport 23 -j ACCEPT
...

Quoting arvinboy <[EMAIL PROTECTED]>:

> hi guys,
>             i had a simple inquiry for iptables:(eth0-outgoing and eth1-
> my internal network)
> 1. how could i block telnet and ftp from outside and accept telnet and
> ftp from my internal network.
> 
> godbless
>   rvin

H o w a r d    R.    B a g c a t 
WebAdmin, MUWeb - Edition 4 Project <http://www.mu.edu.ph>
Systems Programmer, RBT/RBK & MUMC Project 
Misamis University.Ozamiz City.Philippines 
tel: 088.521.0367.local.109 | cel: 63.0919.5536179 

Imagination is more important than knowledge 
-Albert Einstein 


Sulat @MU v.2.2 (Fresh) 
.......................................................................................
An extended module for MUWeb4 Project of Howard R. Bagcat
Powered by GNU General Public License softwares.

http://my.mu.edu.ph - a personalized portal is soon to come.


_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to