Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

rutiranje... jos 1

[es] :: Linux mreže :: rutiranje... jos 1

[ Pregleda: 3119 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

pillot
Tancic Bogdan
Beograd

Član broj: 11417
Poruke: 22
*.InfoSky.Net



Profil

icon rutiranje... jos 103.10.2003. u 01:36 - pre 250 meseci
imam Suse8.2 verziju Lniuxa i na njoj 2 NIC-a. Na jednu karticu je prikljucena lokalna mreza ana drugu je prikljucen AccessPoint.
naravno, poenta je omoguciti korisnicima mreze pristup AP-u.
lan: 192.168.1.0 - 192.168.1.30 eth0-192.168.1.1 subnet: 255.255.255.0
ap: fabrici postavljen na adresi 192.168.0.50 eth1-192.168.0.1 subnet: 255.255.255.0

pri startovanju linuxa sam postavio da se pokrene i :
echo 1 >/proc/sys/net/ipv4/ip_forward

a evo sta javlja pod "route -n" komandom:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

i naravno ne radi. treba li da se podesi gateway i kako ?
u cemu je problem?

unapred hvala
tooSERBtooSTRONG
 
Odgovor na temu

Donald.Secret
Donald Secret

Član broj: 11961
Poruke: 24
195.252.118.*

Sajt: www.lun.co.yu


Profil

icon Re: rutiranje... jos 105.10.2003. u 15:21 - pre 250 meseci
#!/bin/sh
#
# rc.firewall-2.4
FWVER=0.74
#
# Initial SIMPLE IP Masquerade test for 2.4.x kernels
# using IPTABLES.
#
# Once IP Masquerading has been tested, with this simple
# ruleset, it is highly recommended to use a stronger
# IPTABLES ruleset either given later in this HOWTO or
# from another reputable resource.


echo -e "\n\nLoading simple rc.firewall version $FWVER..\n"


# The location of the iptables and kernel module programs
#
# If your Linux distribution came with a copy of iptables,
# most likely all the programs will be located in /sbin. If
# you manually compiled iptables, the default location will
# be in /usr/local/sbin
#
# ** Please use the "whereis iptables" command to figure out
# ** where your copy is and change the path below to reflect
# ** your setup
#
#IPTABLES=/sbin/iptables
IPTABLES=/usr/sbin/iptables
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe


#Setting the EXTERNAL and INTERNAL interfaces for the network
#
# Each IP Masquerade network needs to have at least one
# external and one internal network. The external network
# is where the natting will occur and the internal network
# should preferably be addressed with a RFC1918 private address
# scheme.
#
# For this example, "eth0" is external and "eth1" is internal"
#
#
# NOTE: If this doesnt EXACTLY fit your configuration, you must
# change the EXTIF or INTIF variables above. For example:
#
# If you are a PPPoE or analog modem user:
#
# EXTIF="ppp0"
#
#
EXTIF="eth1"
INTIF="eth0"
echo " External Interface: $EXTIF"
echo " Internal Interface: $INTIF"


#CRITICAL: Enable IP forwarding since it is disabled by default since
#
# Redhat Users: you may try changing the options in
# /etc/sysconfig/network from:
#
# FORWARD_IPV4=false
# to
# FORWARD_IPV4=true
#
echo " Enabling forwarding.."
echo "1" > /proc/sys/net/ipv4/ip_forward


# Enable simple IP forwarding and Masquerading
#
# NOTE: In IPTABLES speak, IP Masquerading is a form of SourceNAT or SNAT.
#
# NOTE #2: The following is an example for an internal LAN address in the
# 192.168.0.x network with a 255.255.255.0 or a "24" bit subnet mask
# connecting to the Internet on external interface "eth0". This
# example will MASQ internal traffic out to the Internet but not
# allow non-initiated traffic into your internal network.
#
#
# ** Please change the above network numbers, subnet mask, and your
# *** Internet connection interface name to match your setup
#


#Clearing any previous configuration
#
# Unless specified, the defaults for INPUT and OUTPUT is ACCEPT
# The default for FORWARD is DROP (REJECT is not a valid policy)
#
echo " Clearing any existing rules and setting default policy.."
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F

echo " FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG

echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

echo -e "\nrc.firewall-2.4 v$FWVER done.\n"

TooL
 
Odgovor na temu

pillot
Tancic Bogdan
Beograd

Član broj: 11417
Poruke: 22
195.252.80.*



Profil

icon Re: rutiranje... jos 107.10.2003. u 19:06 - pre 249 meseci
ok, hvala na odgovoru..
resio sam problem programom "brctl"
i napravio sam bridge izmedju eth0 i eth1

ostaje pitanje samo kako napraviti skriptu sa podizanjem bridga da se startuje svaki put kada se upali ranucar.

pozdrav
tooSERBtooSTRONG
 
Odgovor na temu

[es] :: Linux mreže :: rutiranje... jos 1

[ Pregleda: 3119 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.