route and internet via wireless card to other computer - לינוקס, Mac ומערכות הפעלה אחרות - HWzone פורומים
עבור לתוכן
  • צור חשבון

route and internet via wireless card to other computer


habarbash

Recommended Posts

Hi,

i have two computers connected via crossover cable, they talk each other with ping and quicksynergy, sharing i still didn't checked.

one one of them which is Netbook i have connection via the wireless card on that computer, i want to let the other computer (which is connectet only to the Netbook) surf the , but i still need the cap to talk to each other with quicksynergy, which mean that the "shared to other computers" option on the network card settings doesn't gonna work, because they cant talk natively.

in other words, how i am route the cap to other computer.

details:

Netbook - 10.04, 192.168.10.1

Computer - Lubuntu 10.10, 192.168.10.2

Thanks.

קישור לתוכן
שתף באתרים אחרים

Hi,

I am trying to understand exactly your setup and configuration.

Please output ifconfig -a from the netbook.

You should see the wireless interface and its ip/netmask.

You should also see the ethernet interface with which you want to connect the PC to.

What I generally do for internet sharing, I have a laptop with one NIC, and a PC with 2 NICS. Both running linux.

One of the PC's NIC's is connected to the internet (eth0 in my case) and eth1 is connected to the laptop.

I need to do IP Masquerading in order to get this work (this is done via the iptables)

Also need to enable packet forwarding on the sysctl.conf (IPv4).

And ofcourse, allow traffic on the secondary interface.

Also note that if you are using firestarter or the like, you should be able to get this done via the gui

You can follow such tutorials to help you get around:

http://www.howtoforge.com/internet-connection-sharing-masquerading-on-linux

note that this tutorial uses redhat commands such as chkconfig whereas in debian you would use update-rc.d (but this anyway just for to make sure the sharing happens upon boot)

good luck

קישור לתוכן
שתף באתרים אחרים

אתה את הצעדים הבאים בהנחה והתקנת את brctl ואת brctl-utils :

נניח שהכרטיסים הם ETH0 ו ETH1 נומר ש ETH0 לאינטרנט ו ETH1 למחשב נוסף (זה המצב כרגע אצלי)

brctl addbr br0
ifconfig eth0 down
ifconfig eth1 down
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig br0 192.168.1.100 up
ifconfig eth0 0.0.0.0 up
ifconfig eth1 192.168.1.101 up

לא לשכוח להגדיר default gw מחדש (החלף xxx בכתובת של ה gateway שלך)

route add default gw 192.168.1.xxx

תוודא net.ipv4.ip_forward = 1 ב sysctl.conf

אם אני לא טועה אתה צריך גם לטפל בחומת אש זה היה משהו בסגנון:

iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -A FORWARD --in-interface eth1 --out-interface eth0 -j ACCEPT

קישור לתוכן
שתף באתרים אחרים

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

×
  • צור חדש...