LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 12-10-2006, 10:39 PM   #1
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 365
Blog Entries: 1

Rep: Reputation: 44
Bridging Wireless To Ethernet


I have a laptop that has a wireless card as well as an Ethernet card. I have a desktop that only has an ethernet card. The desktop is connected to a ActionTec GT704WG wireless router/dsl modem, but has no internet connection anymore. I would like to hook an ethernet cable from the laptop to the router, so that I can get internet on the desktop through the laptop's wireless card. I have been reading a bit about bridging, but I am still not sure how to go about doing this, or if bridging is even what I need to do. What I need to know is how to actually wire it, and what software I need to run, and how to configure it.

Thanks,
jrtayloriv

Last edited by jrtayloriv; 12-10-2006 at 10:40 PM.
 
Old 12-11-2006, 12:31 AM   #2
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Set the laptop up to connect to the internet through your wireless card. Then plug your eathernet cable from the desktop into the laptop. You will then use iptables to set your laptop up as a router. google around for iptables, NAT, and masquerading. Post back if you need further assistance.

good luck!
...drkstr
 
Old 12-17-2006, 12:01 AM   #3
morpheous1777
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
edit the shell script to match your setup, it will setup a VERY basic firewall

Code:
#!/bin/sh
# 
####### MODIFY FOR YOUR SETUP #######
#####################################
IPTABLES=/usr/sbin/iptables
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe
EXTIF="ath0"	# device connected to the internet
INTIF="eth0"	# device to share connection with
#####################################
#####################################
$DEPMOD -a
$MODPROBE ip_tables
$MODPROBE ip_conntrack
$MODPROBE ip_conntrack_ftp
$MODPROBE ip_conntrack_irc
$MODPROBE iptable_nat
$MODPROBE ip_nat_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
$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
$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
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
####### MODIFY FOR YOUR SETUP #######
#####################################
ifconfig eth0 192.168.0.1 broadcast 255.255.255.0
# laptop ethernet ip 192.168.0.1 broadcast 255.255.255.0
# desktop ethernet ip 192.168.0.10 broadcast 255.255.255.0 gateway 192.168.0.1 dns ???.???.???.???
# have to set desktop dns server to the gateway ip for internet device
#####################################
#####################################
 
Old 12-17-2006, 12:05 AM   #4
morpheous1777
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
oops forgot, got that from

http://tldp.org/HOWTO/IP-Masquerade-...EWALL-IPTABLES

gotta give credit where credit is due
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMP+ethernet bridging = no-no? Toshiba-Laptop Linux - Networking 0 07-01-2006 10:34 PM
Ethernet bridging pepolez Linux - Networking 3 06-12-2005 06:07 AM
wireless bridging Damon Spector Linux - Wireless Networking 2 03-24-2005 08:12 PM
ethernet bridging not working twsnnva Linux - Networking 2 01-27-2005 02:49 PM
Bridging two ethernet segments over ISDN jweigert Linux - Networking 4 07-16-2002 09:36 AM


All times are GMT -5. The time now is 01:50 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration