Bluehost.com Web Hosting $6.95

iptables question.

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


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-06-2003
Gabolander
 
Posts: n/a
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 !!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0