LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-13-2012, 05:38 PM   #1
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Rep: Reputation: 15
setting up centos to act as a router / bridge


Hi there

I am having problems setting Centos to act as a bridge between my wired LAN and the wireless internet connection. Where I have my LAN I can't get any wireless signal to get access to the internet. The only machine that can get wireless access is my newly acquired server.

so currently I have 1 machine and a server on a wired connection (soon to add another machine) and the server has a wireless connection to the outside world.

I am hoping that this problem is reasonably simple, I've had a very long day at work, and my knowledge of Linux networking is poor at best!

so far from what I have read online is to...
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
then

Code:
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
however when I go to the workstation and try pinging 173.194.67.99 (google) I get the following error

Code:
From 192.x.x.x icmp_seq=1 Dest Unreachable, Bad Code: 10
Now I think this could be an issue with iptables, but I have no idea what or how to fix it. To be fair I might be completely wrong with this and i'm barking up the wrong tree altogether!

If anyone has any idea's about how to solve this please say, then I get on with trying to sort out the nameserver issue.

I don't know if it is relevant but the server is running Centos 6.3 my workstation is running Suse 12.2 and the other machine isn't connected to the network yet!
 
Old 11-13-2012, 06:12 PM   #2
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
Hmmm,

Now I'm completely confused. when I set up eth0 as a trusted interface in the firewall configuration program or turn iptables off I just get 100% packet loss, this is beginning to get really confusing.
 
Old 11-13-2012, 06:22 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,927
Blog Entries: 1

Rep: Reputation: 176Reputation: 176
This is how I've always done it...

vi /etc/sysctl.conf and edit the following

Code:
 net.ipv4.ip_forward = 1
Now sync it with sysctl

Code:
sysctl -p
Restart networking

Code:
service network restart
Next set up your iptables like so...

Code:
service iptables stop
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
service iptables save
service iptables restart
 
Old 11-16-2012, 03:22 PM   #4
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
Sorry for the late reply, I had to dash to London for a couple of days business

Cheers for your help!

now to get the nameserver working

Last edited by the2k; 11-16-2012 at 03:43 PM.
 
Old 11-16-2012, 03:37 PM   #5
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
bizarre, it seems to have started working! its incredibly slow, but at least it seems to work... maybe I need a gigabit switch?

edit... I don't think the switch is at fault, I need to investigate this further, but it shouldn't be this slow...

cheers for your help so far

Mike

Last edited by the2k; 11-16-2012 at 03:42 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can a bridge be configured to act as hub not a switch? tbriden Linux - Networking 2 06-30-2010 09:32 AM
Problem setting up Transparent bridge mode across 2 CentOS boxes vragukumar Linux - Networking 2 12-18-2009 10:58 AM
Setting up a personalized router/ap/wireless bridge/repeater Unregistered Linux - Wireless Networking 0 10-13-2007 04:01 AM
Help, after setting up bridge I can only ping my router. Royle Linux - Networking 0 11-11-2004 09:04 AM
Anyone know of a live-cd which can make my p166 act like a Wireless Bridge? Royle Linux - Wireless Networking 2 09-14-2004 01:27 PM


All times are GMT -5. The time now is 08:20 PM.

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