Jump to content
ELFORUM - Forumul electronistilor

!!!Internet Connection Sharing

Guest snap

Recommended Posts

Am si eu o intrebare.Cum se poate realiza o coneexiune de internet sharing pe linux centos 5.1 ?Se dau urmatoarele:Pc1 (linux Centos 5.1)eth0 (se realizeaza conectarea la internet)eth1 (conectare pc2)Pc2 (windows xp sp3)eth0Mentionez ca vreaus a realizez conexiunea fara router!!!!

Link to comment
  • Replies 3
  • Created
  • Last Reply

Multumesc dar am rezolvat.

Pentru toti care se chinuie sa faca asta este foarte simplu as aam reusit si eu..


creati un fisier numit net.fw in /etc


vi /etc/net.fw

in el adugati urmatoarele linii:


#!/bin/bash#Sets program nameprog="masq v. 1.0 beta [Scriptu nostru]"http_local_proxy=""#Source functions. /etc/init.d/functionsstart() {#iptables rules flushingiptables -Fiptables -t nat -Fecho 1 >/proc/sys/net/ipv4/ip_forward#bridging rulesbrctl addbr br0brctl addif br0 eth1brctl addif br0 eth2ip link set eth1 upip link set eth2 upip link set br0 upip addr add brd + dev br0ip route add default via routing rulesiptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEiptables -A FORWARD -i br0 -j ACCEPT#PROXY startexport http_proxy=$http_local_proxydelegated -P80 SERVER=http CACHEDIR=/cache EXPIRE=1d CRON="0 * * * * -expire 30d" PERMIT="*:*:" PERMIT="*:*:XXXXX.pcnet.ro" &}stop() {#iptables rules flushingiptables -Fiptables -t nat -Fecho 0 >/proc/sys/net/ipv4/ip_forward#bridging stoppingip link set eth1 downip link set eth2 downip link set br0 downbrctl delif br0 eth1brctl delif br0 eth2brctl delbr br0ip route del default via route add default via ip.in.ter.net#killing delegated and resetting http_proxy global variablekillall -9 delegatedexport http_proxy=$http_local_proxy}


In meniul de comanda

adaugati in rc.local tot in /etc

vi /etc/rc.local
urmatoarea linie:



In modulul de comanda


sudo reboot

si asta e tot!!!

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines