This is a discussion on iptables question. within the Linux Networking forums, part of the Linux Forums category; Now for my system, I wrote down the following command when connection start, in order to firewall my system and ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Now for my system, I wrote down the following command when connection start, in order to firewall my system and to enable NAT : ------->8 cut here start 8<------------------------ iptables -F; iptables -t nat -F; iptables -t mangle -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT iptables -P INPUT DROP # solo dopo che i due precedenti hanno avuto successo iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT ------->8 cut here end 8<------------------------ And it's ok. The problem is that it is a massive firewall, in the sense that if I try to enter in my system from another remote system, I can't (I nether can do a ping, to be honest ;-) How can I do i I want, for example, make possible the connection from a specific IP location and for a given port? (Say, I want to let the IP 80.80.80.1 port 22 (ssh) enter in my system) I made different experiments with no results.. Thanks in advance for any help (or URL/link on tutorial with pratical example...) -- === NO SPAM ALERT === If you desire to answer directly to me please post mail to "GgNOzappiSPAM(at)inwind(dot)it" (removing all the uppercase letters, including leading 'G'). Spam mail will be bombed !! |