I'm using a Debian based Linux system, basically there are these interfaces:

wlan0 "wifi connected -"
interface2 "not physical interface -"
eth0 "ethernet cable unplugged- suppose to be connected to windows 7"

What I want is share connection from my Linux to windows 7 through ethernet cable. What i did was using network manager and configure eth0 as "shared to other computer" and it worked!

When I connect linux to windows computer using the cable, my windows 7 pc automatically connect to wlan0 interface and got that interface public ip! What I want is do the same but using only the interface2 interface!

So that my windows pc can browse that specific network using interface2 and shared connection!

Is there a way to do it?

2 Answers 2


You've got 2 options basically.

Either using bridging the connection which will make the windows machine 'appear' to be on exactly the same network as the linux machine, it'd get a DHCP address the same way the linux machine got one, etc.

Or IP Forwarding which means the packets coming in over the eth0 are then forwarded onto the wifi network, and the windows machine will 'appear' to be the linux machine, to anything else on the network.

Each link contains a guide to setting up the appropriate method, and they are both too long to really contain in a answer post. Once you've decided on which method you want to use, it should be a lot easier to find a guide to setting it up exactly as you want it.


Found the solution! To let my windows 7 join the network on interface2 just did:

sudo brctl addbr br0
sudo brctl addif br0 eth0 interface2
sudo ifconfig br0 up
sudo ifconfig eth0 up
sudo ifconfig interface2 up

they all where without ip, br0 had automatic dhcp option.

Windows 7 also automatic dhcp.

Then just connect linux to windows with ethernet cable and done! My windows 7 machine joined the network on interface2 and had its own internal ip and was able to browse web and have my public ip from that network!

  • What is the interface2 ? A wifi or ethernet interface? i am a bit confused
    – GAD3R
    Oct 5, 2017 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .