On Tue, 2003-10-28 at 18:37, Winelfred G. Pasamba wrote:
> anybody knows the ipchains/iptables command to enable ftp to localhost
> only?  i want to authenticate local users from a webpage and its very
easy
> to use php's ftp functions for this.  what's your advice?
> 
> thanks!

[next time, when creating a new thread, create a new email. Dont "reply"
on another thread.]

you could use this:

#######################
# flush all rules
iptables -F

# accept all connections from the local interface, all protocols
iptables -A INPUT -i lo -p all -j ACCEPT
iptables -A OUTPUT -o lo -p all -j ACCEPT

# accept all established connections
iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --tcp-option ! 2 -j REJECT --reject-with
tcp-reset

#open http port
iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT

#drop all other connections
iptables -P INPUT DROP
######################

This enables only http connections from the outside world. Is this what
you want?




-- 
Ramil G. Sagum
[EMAIL PROTECTED]

ããã ããããããã ãããããã? 

--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to