« -: Jul 03, 2004, 15:33 »
Zdraveite, znachi imam sledniq problem:
Svurzan sum kum HomeLan PPP0 i imam vutreshna mreja eth0
Iskam vtoriq mi komp. da ima net, ama neste.
Pod windows go prawq s wingate i wsichko si e nared ama pod
Slackware 10.0 neste da trugne.
Nqkakwi predlojeniq?
Eto i scriptowete mi:
iptables:
# Generated by iptables-save v1.2.7a on Sat Jul 12 21:15:24 2003
*nat
:PREROUTING ACCEPT [51:4039]
:POSTROUTING ACCEPT [30:2304]
:OUTPUT ACCEPT [21:1872]
-A POSTROUTING -s 192.168.0.0/255.255.0.0 -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat Jul 12 21:15:24 2003
rc.local:
#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# DO NOT REMOVE THIS LINE
/usr/sbin/iptables-restore /root/iptables
/etc/rc.d/Daemonscrc
# Put any local setup commands in here:
if [ -x /usr/sbin/adsl-start ]; then
/usr/sbin/adsl-start && echo -n " PPPoE "
fi
EXTERNAL=ppp+
EXTERNAL2=eth0
INTERNAL=eth1
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
iptables -t nat -A POSTROUTING -o $EXTERNAL2 -j MASQUERADE
/etc/ppp/firewall-masq:
#!/bin/sh
#
# firewall-masq This script sets up firewall rules for a machine
# acting as a masquerading gateway
#
# Copyright © 2000 Roaring Penguin Software Inc. This software may
# be distributed under the terms of the GNU General Public License, version
# 2 or any later version.
# LIC: GPL
# Interface to Internet
EXTIF=ppp+
ANY=0.0.0.0/0
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward DENY
ipchains -F forward
ipchains -F input
ipchains -F output
# Deny TCP and UDP packets to privileged ports
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENY
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY
# Deny TCP connection attempts
ipchains -A input -l -i $EXTIF -p tcp -y -j DENY
# Deny ICMP echo-requests
ipchains -A input -l -i $EXTIF -s $ANY echo-request -p icmp -j DENY
# Do masquerading
ipchains -A forward -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward