Computing.Net > Forums > Linux > iptables help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

iptables help

Reply to Message Icon

Name: jazzman
Date: September 11, 2002 at 09:03:43 Pacific
OS: linux
CPU/Ram: p2 128MB
Comment:

Below is my script, I have eth1 as my internal interface and eth0 as my external interface which will allow pkts into my ADSL gatway:192.168.0.5 and get routed out into the internet. I am now doing a very simple script which i want to allow my internal lan to be abled to ping the internet.

LAN_INT=”eth1”
LAN_ADDR="192.168.30.10"
LAN_ZONE=”192.168.30.0/24”

DMZ_INT=”eth0”
DMZ_ADDR="192.168.0.10"
DMZ_ZONE="192.168.0.0/24"

IPTABLES -A FORWARD -i $LAN_INT -o $DMZ_INT -j ACCEPT
IPTABLES -A FORWARD -i $DMZ_INT -o $LAN_INT -j ACCEPT

the rules above does not allow my internal lan to ping any address from the internet!!!
anyway can help pls.......



Sponsored Link
Ads by Google

Response Number 1
Name: armin
Date: September 11, 2002 at 09:56:35 Pacific
Reply:

you need a masq or NAT rule.


0

Response Number 2
Name: jazzman
Date: September 11, 2002 at 23:24:18 Pacific
Reply:

how do I do that?


0

Response Number 3
Name: Dan Garland
Date: September 12, 2002 at 08:48:28 Pacific
Reply:

Hi m8,

I read your question as "how do I ping my PC from a remote pc on the internet". If that's not what you meant, soz u might need to rephrase it :)

Anyway, the following rule should work

$IPTABLES -A INPUT -i $DMZ_INT -p ICMP -s $0.0.0.0/0 -d DMZ_ADDR -j ACCEPT

this is where u have used DMZ_INT to be your external interface and DMZ_ADDR to be your external IP.

This rule says 'accept any ICMP protocol incoming on the external interface from any PC'

Hope this helps...
Regards
Dan Garland


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


gcc and make not installe... how to install named.conf...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: iptables help

iptables error www.computing.net/answers/linux/iptables-error/12660.html

IPTABLES & Port forwarding www.computing.net/answers/linux/iptables-amp-port-forwarding/12642.html

IPTable help www.computing.net/answers/linux/iptable-help/29938.html