I’m on opensuse 11.4 (11.3 won’t work with my monitor).
My computer gets internet through wireless and I want to share that internet through its ethernet port. So far I’ve tried using Knetworkmanager to create a network bridge between my wireless and wired connections. I created a new wired connection and shared it using the ip address settings. I was able to get both connections active, but the device hooked up via ethernet had no internet connectivity.
I also tried this command:
echo 1 > /proc/sys/net/ipv4/ip_forward
but another test resulted in the same fashion (no internet on wired). I believe anything I add to /proc should have an immediate effect, correct?
>
> I’m on opensuse 11.4 (11.3 won’t work with my monitor).
>
> My computer gets internet through wireless and I want to share that
> internet through its ethernet port. So far I’ve tried using
> Knetworkmanager to create a network bridge between my wireless and wired
> connections. I created a new wired connection and shared it using the ip
> address settings. I was able to get both connections active, but the
> device hooked up via ethernet had no internet connectivity.
>
> I also tried this command:
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> but another test resulted in the same fashion (no internet on wired). I
> believe anything I add to /proc should have an immediate effect,
> correct?
>
> I appreciate any help.
>
>
xenphor;
I thing you are looking for IP Masquerading. This HowTo will tell you how to
share the Internet with other machines.
PS: If your wireless is configured via dhcp, you should be able to leave it
alone (Swerdna’s Howto implies you would need a fixed IP, but it should not
be needed).
–
P. V.
“We’re all in this together, I’m pulling for you.” Red Green
Well I tried following that guide and I still can’t get internet to my wired device (xbox360). I do use dhcp on my wireless so I didn’t change that for the ethernet card. Since I use dhcp, I also didn’t configure anything on the client device. Everything else I followed exactly.
It seems that the ip forwarding option could be used to simply bridge the devices, but I tried enabling that without changing anything else and that also didn’t work.
Turns out I already had that installed but it did upgrade. I then tried again with knetwork using the shared setting but had the same problem. I also tried again with ifup and couldn’t receive internet either.
>
> Well I tried following that guide and I still can’t get internet to my
> wired device (xbox360). I do use dhcp on my wireless so I didn’t change
> that for the ethernet card. Since I use dhcp, I also didn’t configure
> anything on the client device. Everything else I followed exactly.
>
> It seems that the ip forwarding option could be used to simply bridge
> the devices, but I tried enabling that without changing anything else
> and that also didn’t work.
>
xenphor;
You need to configure the client device, unless you use your own dhcp server
on the wired network. The above configuration makes your OpenSuse box act
like a router. Your ISP’s dhcp will stop at the server. Configure the
client following the HowTo.
I can give more detailed advice if you will post the results of:
/sbin/ifconfig -a
–
P. V.
“We’re all in this together, I’m pulling for you.” Red Green
>
> venzkep;2295427 Wrote:
>> On Fri February 25 2011 10:06 pm, xenphor wrote:
>>
>> >
>> > Well I tried following that guide and I still can’t get internet to
>> my
>> > wired device (xbox360). I do use dhcp on my wireless so I didn’t
>> change
>> > that for the ethernet card. Since I use dhcp, I also didn’t configure
>> > anything on the client device. Everything else I followed exactly.
>> >
>> > It seems that the ip forwarding option could be used to simply bridge
>> > the devices, but I tried enabling that without changing anything else
>> > and that also didn’t work.
>> >
>> xenphor;
>>
>> You need to configure the client device, unless you use your own dhcp
>> server
>> on the wired network. The above configuration makes your OpenSuse box
>> act
>> like a router. Your ISP’s dhcp will stop at the server. Configure
>> the
>> client following the HowTo.
>>
>> I can give more detailed advice if you will post the results of:
>>
>> >
> Code:
> --------------------
> > >
> > /sbin/ifconfig -a
> >
> --------------------
>> >
>> –
>> P. V.
>> “We’re all in this together, I’m pulling for you.” Red Green
>
> Here’s ifconfig -a
>
>
> Code:
> --------------------
>
> eth0 Link encap:Ethernet HWaddr 00:A0:D1:BF:D2:A1
> inet6 addr: fe80::2a0:d1ff:febf:d2a1/64 Scope:Link
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:684 errors:0 dropped:0 overruns:0 frame:0
> TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:83058 (81.1 Kb) TX bytes:89540 (87.4 Kb)
> Interrupt:11
>
> eth1 Link encap:Ethernet HWaddr 00:12:F0:63:AB:FD
> inet addr:192.168.0.178 Bcast:192.168.0.255 Mask:255.255.255.0
> inet6 addr: fe80::212:f0ff:fe63:abfd/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:298632 errors:1007 dropped:1007 overruns:0 frame:0
> TX packets:210301 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:390415643 (372.3 Mb) TX bytes:15535654 (14.8 Mb)
> Interrupt:11 Base address:0xc000 Memory:b800b000-b800bfff
>
> 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:580 errors:0 dropped:0 overruns:0 frame:0
> TX packets:580 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:41860 (40.8 Kb) TX bytes:41860 (40.8 Kb)
>
> --------------------
>
>
> I’m confused because if I use dhcp for wireless, how do I know the
> correct settings for wired?
>
> I tried:
> IP: 192.168.5.8
> Mask: 255.255.255.0
> Gateway: 192.168.0.1
>
> Name servers:
> 68.2.16.30
> 68.2.16.25
>
> These were the settings of my client (xbox) but didn’t work
>
>
> please_try_again----
>
> That script looks promising, unfortunately when I run it:
>
> sudo vm-bridge -i eth0 eth1 -b br0
> Error: virsh not found
>
> Couldn’t find virsh in zypper either…
>
>
xenphor;
It looks like eth1 is your wireless? It is on 192.168.0.0/24.
On eth0,your gateway, assign an IP outside of this sub domain. Say
192.168.1.1. Set the mask to 255.255.255.0. The gateway is unimportant.
On the client assign an IP in the 192.168.1.0/24 sub domain, different than
that on the gateway. Say 192.168.1.100. Set the Network mask to
255.255.255.0. Set the gateway to 192.168.1.1 (i.e. the IP of eth0). Now
find the IP of your ISP’s DNS server (Check their Web site or look
in /etc/resolv.conf). If you can not determine this IP, just use the Google
public DNS servers 8.8.8.8 or 8.8.4.4. Use this IP for the DNS server field
on the client.
On the client you will need to have assigned these three values:
An IP (e.g. 192.168.1.100)
A Gateway (e.g. 192.168.1.1) This is the IP of your gateway interface
A DNS server (e.g. 8.8.8.8) (Or the IP of your ISP’s DNS server)
–
P. V.
“We’re all in this together, I’m pulling for you.” Red Green
virsh is in the package libvirt_client. You got that error because this script is originally intended to convert virtual machines from NAT to bridge, creating the bridge if necessary. You don’t need to install libvirt_client if you’re not planing to work with kvm virtual machines. Just comment out the following line in the script :
# which virsh &> /dev/null || Error "virsh not found"
BTW the command line you type is not going to work with this script, as it is not intended to add more than one port to a bridge. You can only do :
vm-bridge -i eth0 -b br0
If you want to add another port to br0, you’ll do afterwards:
On Sat February 26 2011 01:06 am, please try again wrote:
>
> venzkep;2295449 Wrote:
>> Now
>> find the IP of your ISP’s DNS server (Check their Web site or look
>> in /etc/resolv.conf).
>
> or just type dig (from package bind-utils)
>
>
please try again;
“There must be a thousand ways to …” Simon and Garfunkle
–
P. V.
“We’re all in this together, I’m pulling for you.” Red Green
When I assign the ethernet an ip address of 192.168.1.1 and netmask 255.255.255.0, the client (xbox360) refuses to acknowledge that it is connected so it won’t allow me to assign an ip, mask, or gateway for it. When ethernet is set to dhcp, this isn’t the case. The client appears to receive an ip address under dhcp, but the gateway section is all 0’s.
I just read your orginal question (which I didn’t actually do before). What are you trying to do? You want to use your computer - which gets a connection on its wireless nic - as a router in a wired lan? Is that right?
I want to be able to give internet access to my wired only 360 by hooking it up to my computer’s ethernet. On windows I was the able to select both my ethernet and wireless cards, right click, and select “add to bridge.” Then, once these connections were in a bridge, I could connect to the internet wirelessly and give internet access to my xbox through a wired connection. I never had to modify the ethernet card on windows to do this so that’s why I’m somewhat confused now.
Hmm … I supected there were some Windows background here.
OK. The concept of Internet sharing under Windows (as many others) is wrong … or at least misleading. Under Linux you don’t create a bridge for that. You just have the connected computer acting as a ‘router’ (you need to enable IP forwarding and IP maskerading on that computer). Is there a way to ‘manually’ set the IP and the gateway on the xbox? I don’t know this type of devices. That’s basically all you need to do. The IPs on the xbox and the one of your wired device must belong to the same network (for example both start with 192.168.1) and the xbox should use the wired IP of the connected computer as its gateway. Further I don’t know if you can set up DNS on the xbox. If those settings are not possible, you have to run a dhcp server on your Linux box, which is not too complicated. That way the xbox should get everything it needs from your dhcp server (provided it is able to send a dhcp request), in the same way you get your IP, gateway and name server from your ISP.
And you would like to add a comment “worked perfect on openSUSE”, do you? I 'm quite sure it works … or more pecisely, I don’t see why it would not. The method to create bridge is the same under Fedora, openSUSE and Ubuntu. Only the user interfaces differ. The method decribed in the link you posted above (System → Preferences → Network Connections) use the same program under Fedora and openSUSE (under Gnome). This is /usr/bin/nm-connection-editor from package NetworkManager-gnome - the network manager Gnome interface. You need to have your network configured with the network manager method on order to use it. KDE has another interface to the network manager, which (I assume) would let you do the same.
In case someone else might need this I made this work using xbox automatic settings and KDE NetworkManager on openSUSE 11.3. Here’s what has worked for me :
[ol]
[li]Configure your wireless profile IP address tab -> Method: DHCP[/li][li]Make sure the wireless internet connection is working[/li][li]Enable ip forwarding by becoming root and then using the command [/li]```
echo 1 > /proc/sys/net/ipv4/ip_forward
[li]Set up your wired profile IP address tab -> Method : shared[/li][li]Set the wired profile to connect automatically and make sure all other profiles for wired are NOT set to connect automatically[/li][li]Connect your openSUSE PC Ethernet interface with xbox's using crossover Ethernet cable[/li][li]Make sure that xbox has got the IP address assigned (something from 10.42.43.0/24 network for example 10.42.43.79 the Primary DNS Server and Gateway should set itself to 10.42.43.1 by default)[/li][li]Configure the openSUSE firewall YAST->security and users->firewall[/li][LIST=1]
[li]Interfaces tab->eth0->change...->select internal network[/li][li]Address translation tab->check the box called translate network addresses[/li][li]Save settings and restart the firewall[/li][/ol]
[li]Test the xbox live connection[/li][/LIST]
This procedure has been tested on the laptop from my description.
Best regards,
Greg