LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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
  Search this Thread
Old 04-05-2017, 01:27 AM   #1
manuelvartanian
LQ Newbie
 
Registered: Apr 2017
Posts: 1

Rep: Reputation: Disabled
how to connect eth0 to lan and wlan0 to the internet on a different subnet


Hello there,
i have installed Kali Linux on a lab environment and i cannot figure out 2 things.

1.how to connect eth0 to a LAN and wlan0 to the internet on a different subnet. i need them both to work in the same time. seems eth0 is taking precedence on wlan0.
eth0 is not connected to the Internet but wlan0 is whenever i connect eth0 the INTERNET is disconnected.

2.how can i configure packet forwarding in a such case with routing table.
 
Old 04-05-2017, 06:49 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,103

Rep: Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836
this is not really an LFS question please ask a mod to move it to a more appropriate forum
 
Old 04-05-2017, 08:32 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,014

Rep: Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684Reputation: 5684
Moved: This thread is more suitable in linux-networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-05-2017, 08:53 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,173

Rep: Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507Reputation: 2507
Quote:
Originally Posted by manuelvartanian View Post
Hello there,
i have installed Kali Linux on a lab environment and i cannot figure out 2 things.

1.how to connect eth0 to a LAN and wlan0 to the internet on a different subnet. i need them both to work in the same time. seems eth0 is taking precedence on wlan0.
eth0 is not connected to the Internet but wlan0 is whenever i connect eth0 the INTERNET is disconnected.

2.how can i configure packet forwarding in a such case with routing table.
There can be only ONE default route, so whichever leads more directly to the default router will always act as your primary interface. You can add specific routes to direct some subset of all external network traffic to a different device, but that does not sound like what you would want. What DO you want? What is the purpose of activating two interfaces at the same time that are not on different networks?
 
1 members found this post helpful.
Old 04-05-2017, 09:01 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,309

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
in case this is what the op is looking for:
http://www.linuxquestions.org/questi...6/#post3804866
 
Old 04-05-2017, 03:39 PM   #6
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Welcome OriginalPoster. To precisely see what you have, post output of this command: ip r

#4! I -almost- fell into 'trap' where GooGl returns:
several|multiple|two "default routes" linux|debian|ubuntu
Apparently (I'm learning here too!), the (correct) word is: gateways (?)
http://serverfault.com/questions/823...outes-in-linux
http://serverfault.com/questions/737...routes2/746053 ?!
http://superuser.com/questions/37456...fault-gateways
Even adding site:linuxquestions.org, I still get 188! Yea *web-research*!

Advice to OP: DDG! &LQ: 1 2 3 4 5 search, etc.
 
  


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
How do I route internet in from wlan0 and out through eth0 in debian/centOS? slacker_ Linux - Networking 8 01-31-2014 06:56 PM
[SOLVED] Can't manage to set up a router (eth1 bridged w/ wlan0 connected to eth0 Internet) kummiliim Linux - Networking 3 09-12-2009 10:45 AM
ignoring dhcp requests on eth0 and wlan0 define subnet mask? Person_1873 Linux - Server 1 12-15-2007 06:58 AM
I cannot connect to the internet over wlan0 ChrisScott Linux - Wireless Networking 5 01-24-2007 02:10 PM
How can i choose network card (eth0 or wlan0) to connect to internet? Klas Linux - Networking 4 05-07-2004 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration