انجمنهای فارسی اوبونتو
کمک و پشتیبانی => شبکه و سرویس دهندهها => نویسنده: mahdif در 21 آبان 1388، 08:30 بظ
-
سلام به همه دوستان
اولا بگم من خیلی تازه کارم ! تازه اومدم تو جمعتون ...
حالا بگم تو xp من چجوری این کار رو می کنم ...بعد شما خیلی آروم و آهسته کمک کنید همین کارو توی linux بکنم :(
xp : اینجوری که
cpntrol panel => Network setup windows => click on " This computer connects directly to the internet. The other computers on my network connect to the internet trough this computer"
و غیره :D
و بدون اینکه ip بدهم اینترنت رو اشتراک می گذارم
lمودم با usb وصل است و اینترنت برقرار و accesspoint هم با lan وصل شده و چراغ lan روشنه ...
خیلی ممنون می شم با کمک به من ..من هم را بدهید بینتون :(
-
مودمتون پورت شبکه نداره که مستقیما به access point وصلش کنید؟ آخه راستش من یه زمانی خواستم این کارو بکنم یعنی اینترنت را توسط اوبونتو به اشتراک بذارم ولی نتوستم! :( البته الان یه مودم وایرلس دار با 4 پورت شبکه دارم و حالشو می برم. بی دردسر. شما هم اگه بتونید مودم را به access point وصل کنید خیلی بی دردسر میشه.
-
سلام والا من برای خونه می خام ... یه اکسس پوینت دارم که دست دوم خریدم ;D و روتر نداره ! یعنی نمی شه که مستقیم از مودم بهش وصل کنم ! حتما باید از کامپیوتر بگیره ....
باید یه راحی وجود داشته باشه.... دوستان دیگه هم اگه نظری دارند بدن ..خوشحال می شم ساید مشکلم حل شد.
اینم عکسش
;D
http://www.mahdifekri.com/10.JPG
مرسی از همتون
-
راه که داره. حتی تو wiki انگلیسی هم یه زمانی یه چیزهایی خوندم. این مطلب را تو سایت ubuntugeek نوشته بود. یه تلاشی بکنید ببینید چی میشه:
Share your Internet connection using the following Procedure
Note: Type all the following commands in a root terminal
Start by configuring the network card that interfaces to the other computers on you network
sudo ifconfig ethX ip
IP: مورد نظر برای سرور (معمولا 192.168.0.1)
ethX: کارت شبکه شماست که برای فهمیدنش خروجی دستور زیر را بگیرید:
sudo ifconfig
برای مثال خروجی این دستور برای من این بود:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:69527 errors:0 dropped:0 overruns:0 frame:0
TX packets:69527 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:41559546 (39.6 MiB) TX bytes:41559546 (39.6 MiB)
eth0 Link encap:Ethernet HWaddr 00:17:9A:0A:F6:44
inet addr:192.168.2.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::217:9aff:fe0a:f644/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:227614 errors:0 dropped:0 overruns:0 frame:0
TX packets:60421 errors:0 dropped:0 overruns:0 carrier:0
collisions:272 txqueuelen:1000
RX bytes:69661583 (66.4 MiB) TX bytes:10361043 (9.8 MiB)
Interrupt:17
wlan0 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:192.168.1.2 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1024 errors:0 dropped:0 overruns:0 frame:0
TX packets:1320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
در خروجی که نگاه کنید eth0 کارت شبکه سیمی من هست و wlan0 کارت شبکه بی سیم که بسته به نوع ارتباط کامپیوتر با access point باید به جای اون ethX قرارش بدید.
Then configure the NAT as follows
sudo iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
where ethX is the network card that the Internet is coming from
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
Install dnsmasq and ipmasq using the following command
sudo apt-get install dnsmasq ipmasq
Restart dnsmasq using the following command
sudo service dnsmasq restart
Reconfigure ipmasq to start after networking has been started
sudo dpkg-reconfigure ipmasq
Start by configuring the network card that interfaces to the other computers on you network
sudo ifconfig ethX ip
where ethX is the network card and ip is your desired server ip address (Usually 192.168.0.1 is used)
Then configure the NAT as follows
sudo iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
where ethX is the network card that the Internet is coming from
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
Add the line “net.ipv4.ip_forward = 1″ to /etc/sysctl.conf
sudo gedit /etc/sysctl.conf
Reboot your system.