Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

iptables question.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2003, 07:59 PM
Default iptables question.




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 !!


Gabolander
Reply With Quote
Reply

Tags
iptables, question

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 03:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.