Re: ethernet and wifi together

2014-02-25 Thread Rob Owens
On Mon, Feb 24, 2014 at 03:32:08PM +0100, S3v3ran . wrote:
> Hello
> 
> My scenario is the following. I'm connected to the wired network, which is
> the default network i'm using. The default gateway, DNS server and
> everything else is via this interface. On the other side i have some
> virtual machines inside and i need them to use the bridged wifi connection
> (because the wired one is behind a proxy server). For this i also need to
> have connected the wireless network (using WPA2-PSK). When i use Wicd. When
> i use Wicd to connect to wifi, it automatically disconnects me from
> ethernet and when i connect to ethernet, it disconnects me from wifi. Both
> connections (wifi and wired) should be configured dynamically (i'm using
> various networks at home or in the company). I tried a network-manager but
> I couldn't connect to wifi with it. Is there a way how to connect
> dynamically to both interfaces, using the eth0 as default route? Thanks in
> advance.
> 
I'm not sure if this will work, but you could remove the "wired
interface" device in wicd's preferences, then use
/etc/network/interfaces to configure the wired interface like this:

allow-hotplug eth0
iface eth0 inet dhcp

-Rob


signature.asc
Description: Digital signature


Re: ethernet and wifi together

2014-02-25 Thread Henning Follmann
On Mon, Feb 24, 2014 at 03:32:08PM +0100, S3v3ran . wrote:
> Hello
> 
> My scenario is the following. I'm connected to the wired network, which is
> the default network i'm using. The default gateway, DNS server and
> everything else is via this interface. On the other side i have some
> virtual machines inside and i need them to use the bridged wifi connection
> (because the wired one is behind a proxy server). For this i also need to
> have connected the wireless network (using WPA2-PSK). When i use Wicd. When
> i use Wicd to connect to wifi, it automatically disconnects me from
> ethernet and when i connect to ethernet, it disconnects me from wifi. Both
> connections (wifi and wired) should be configured dynamically (i'm using
> various networks at home or in the company). I tried a network-manager but
> I couldn't connect to wifi with it. Is there a way how to connect
> dynamically to both interfaces, using the eth0 as default route? Thanks in
> advance.
> 
> Severan


I had a similar problem, and I will get to it in a second.
But first: bridged Wifi might not work. Some AP refuse to accept packages,
which are not from the interface bound to it. So you would have to
masquerade those packages with ebtables.

Here how I did it.
I created a dummy-bridge which is completely internal

in /etc/network/interfaces

...
iface dummy0 inet manual

auto br0
iface br0 inet static
address 10.0.77.1
network 10.0.77.0
netmask 255.255.255.0
broadcast 10.0.77.255
bridge_ports dummy0
bridge_stp yes
post-up /bin/echo 1 > /proc/sys/net/ipv4/ip_forward
post-up /sbin/iptables --table filter --insert INPUT --source \
10.0.77.0/255.255.255.0 -j ACCEPT
post-up /sbin/iptables --table filter --insert FORWARD --source \
10.0.77.0/255.255.255.0 -j ACCEPT
post-up /sbin/iptables --table filter --insert FORWARD \
--destination 10.0.77.0/255.255.255.0 --match state --state \
ESTABLISHED,RELATED -j ACCEPT
post-up /sbin/iptables --table nat --insert POSTROUTING --source \
10.0.77.0/255.255.255.0 ! --destination 10.0.77.0/255.255.255.0 -j \
MASQUERADE
pre-down /sbin/iptables --table filter --delete INPUT --source \
10.0.77.0/255.255.255.0 -j ACCEPT
pre-down /sbin/iptables --table filter --delete FORWARD --source \
10.0.77.0/255.255.255.0 -j ACCEPT
pre-down /sbin/iptables --table filter --delete FORWARD \
--destination 10.0.77.0/255.255.255.0 --match state --state
ESTABLISHED,RELATED -j ACCEPT
pre-down /sbin/iptables --table nat --delete POSTROUTING --source \
10.0.77.0/255.255.255.0 ! --destination 10.0.77.0/255.255.255.0 -j \
MASQUERADE

...

So 10.0.77.0/24 is my xen network for all my virtual domains.
It just will work with the default vif-bridge script. 

I also use dnsmasq to serve all virtual machines with a proxy dns server.

Then I agree with my previous poster. Get rid of any network manager.
Install wpasupplicant for your wifi and manage the ethernet with
resolvconf.




-H


-- 
Henning Follmann   | hfollm...@itcfollmann.com


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140225232000.gc25...@newton.itcfollmann.com



Re: ethernet and wifi together

2014-02-24 Thread Reco
 Hi.

On Mon, 24 Feb 2014 15:32:08 +0100
"S3v3ran ."  wrote:

> Is there a way how to connect
> dynamically to both interfaces, using the eth0 as default route? Thanks in
> advance.

Sure, there's a way. Remove NetworkManager and wicd as both of them are
unsuitable for managing network settings anyway. Install wpasupplicant
and resolvconf (unless you have them already).

Configure your network interfaces at /etc/network/interfaces:

1) Wired - the usual way, with 'gateway' and 'dns-nameservers' stanzas.

2) Wireless - in accordance
with /usr/share/doc/wpasupplicant/README.Debian.gz, section 'Roaming
profiles' IIRC.

Reco


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20140224190202.667e5f26727555c6acf4b...@gmail.com



ethernet and wifi together

2014-02-24 Thread S3v3ran .
Hello

My scenario is the following. I'm connected to the wired network, which is
the default network i'm using. The default gateway, DNS server and
everything else is via this interface. On the other side i have some
virtual machines inside and i need them to use the bridged wifi connection
(because the wired one is behind a proxy server). For this i also need to
have connected the wireless network (using WPA2-PSK). When i use Wicd. When
i use Wicd to connect to wifi, it automatically disconnects me from
ethernet and when i connect to ethernet, it disconnects me from wifi. Both
connections (wifi and wired) should be configured dynamically (i'm using
various networks at home or in the company). I tried a network-manager but
I couldn't connect to wifi with it. Is there a way how to connect
dynamically to both interfaces, using the eth0 as default route? Thanks in
advance.

Severan