iptables question
Im just learning iptables and I need a quick fix on a small problem that I have
this rule obviously allow port 587 Code:
$IPT -A FORWARD -i $LOCAL_IFACE -o $INET_IFACE1 -p tcp -s $LOCAL_NET --dport 587 -j ACCEPT how would i do that? |
From where i'm sitting this looks like a scripting thing that is unrelated to iptables.
The script (you are using) will have a definition for $LOCAL_NET I'd suggest either substituting '-s $LOCAL_NET' with '-s 117.234.23.123' (replace the ip you want to use) If you want to re-use the same ip you can define it in the script like: LOCAL_IP_NR_1="117.234.23.123" And then use that variable in the line with; '-s $LOCAL_IP_NR_1' You get the idea .. |
thanks for the quick reply muha
i tried changing -s $LOCAL_NET with my ip address and it work. little by little im learning :) |
If you need more info have a look in the bookmarks section on iptables:
http://www.linuxquestions.org/bookmarks/tags/iptables And try to concentrate on the syntax that you would use to feed those commands into iptables buy hand. What you need to realize that your script will actually perform this command (depending on your setup the interfaces eth0/1 differ): Code:
iptables -A FORWARD -i eth0 -o eth1 -p tcp -s 117.234.23.123 --dport 587 -j ACCEPT |
thanks for the link muha
|
All times are GMT -5. The time now is 07:01 AM. |