LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptable help (https://www.linuxquestions.org/questions/linux-security-4/iptable-help-62372/)

Neomaster 05-28-2003 05:35 PM

iptable help
 
echo -e "\n\tLoading Firewall Rules"
# Enable forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
LAN_IP_NET='192.168.0.1/24'
LAN_IP_NET2='192.168.1.1/24'
LAN_NIC='eth1'
LAN_NIC2='eth3'
#WAN_IP='65.65.96.38'
WAN_NIC='eth0'


I do have eth0 eth1 in my pc with 2 nic cards.I just want to use internet share with my other pc.


this how i write my firewall out so far.




echo -e "\n\tLoading Firewall Rules"
# Enable forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
LAN_NIC eth0
WAN_NIC eth1


AM i doing this right so far?:newbie: :Pengy:

manthram 05-28-2003 05:40 PM

you going to ask this question for every four lines of script you add to it. go ahead write the whole thing and come back if there are any errors

all the best;) :p

Neomaster 05-28-2003 07:58 PM

The prob is that i don't use dsl so i can't use WAN_NIC.SO how can i just use LAN_NIC in my script?That where i lost.

Neomaster 05-28-2003 09:14 PM

I forgot to say WAN_IP would be the prob because i don't have dsl.How can i get it to work with dial-up?:newbie: :Pengy:

Robert0380 05-29-2003 08:56 PM

isnt the modem ppp0, you could write all rules and use ppp0 as the device rather than eth0.

Neomaster 05-29-2003 09:13 PM

How would i do that?I have 2 nic in mt pc as a gateway:):confused:


All times are GMT -5. The time now is 05:21 PM.