LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-10-2014, 04:46 PM   #1
ramx
LQ Newbie
 
Registered: Aug 2014
Distribution: Debian jessie/sid 64-bit
Posts: 12

Rep: Reputation: Disabled
Question random ask


Best Regards
good afternoon Thanks for your time, knowledge and opinion.

I can somehow redirect that will have access via WAN to an application?

example, Mail-Evolution. Qbit, genymotion.

Thanks in advance.

ramx
 
Old 10-10-2014, 06:43 PM   #2
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Rep: Reputation: 46
Quote:
I can somehow redirect that will have access via WAN to an application?
I read that a couple of times, but could not quite figure out what you mean.
Do you mean that WAN traffic from certain programs should be redirected to some certain local programs?
 
Old 10-10-2014, 11:53 PM   #3
ramx
LQ Newbie
 
Registered: Aug 2014
Distribution: Debian jessie/sid 64-bit
Posts: 12

Original Poster
Rep: Reputation: Disabled
im using cable for browser but i want use Mail-evolution with wireless card.

sry my english i cant explain better.
 
Old 10-11-2014, 04:23 AM   #4
SkaarjZR
LQ Newbie
 
Registered: Dec 2013
Location: Moscow
Distribution: Slackware
Posts: 3

Rep: Reputation: Disabled
You probably need to add a specific route for your mail servers.
route add <server> dev wlan0
Or something like that.
 
Old 10-11-2014, 06:29 AM   #5
Nogitsune
Member
 
Registered: Oct 2014
Posts: 33

Rep: Reputation: Disabled
Quote:
Originally Posted by ramx View Post
im using cable for browser but i want use Mail-evolution with wireless card.

sry my english i cant explain better.
If I understand the question correctly, your situation is as follows:

You have two network connections on your linux machine. One is cable connection, and the other is wireless connection, and they are both operating at the same time. You want to use cable for most of your connections, but you want to redirect email client to use the wireless connection instead.

I can't give step-by-step instructions off the top of my head, but I believe something like this would work:
You obviously need to set up the network for both connections. You'd let the cable be the default route, which puts all connections through it normally. You could then probably use firewall (iptables) to set up a rule for redirecting outgoing connections that are directed to mail server ports, and direct those to the wireless connection.

Alternately if your email client can be set up to use specific network connection, that would be the easier solution, but I haven't come across that kind of option myself.

Also, like SkaarjZR said, if you only use some specific mail services, you could instead just create a route to IP addresses of those mail services through the wireless connection. You'd have to do this anyway if you use a browser based mail host, something like gmail, hotmail or something similar. In this case though you'd have to know exactly what addresses the mail services use, which can be difficult. Also any other connections to those web sites would also go through the wireless network - even if you were just browsing those sites.

So all said, it probably isn't very simple problem. The easiest solution, though imperfect, would probably be to create a script that switches your computer between using one or the other of the connections.. and then switch it to using wireless connection (for all activity) when you want to access the mail.. and then switch it back to using cable when done. This is more work to use, and would mean you can't do any other network activities while using the mail, but in most cases this would be a whole lot easier to implement.

One more solution, a bit different, comes to mind. It's always possible to set up a virtual machine on top of your linux system, and set that one up to using your wireless network. You could use that virtual machine for email, and any other activity that you want to use the wireless network for. It's a bit extravagant solution, setting up a whole new linux system, but it would also give you more options.

Last edited by Nogitsune; 10-11-2014 at 06:36 AM.
 
1 members found this post helpful.
Old 10-11-2014, 08:40 AM   #6
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Mint, Debian
Posts: 601

Rep: Reputation: 46
'route add' does the trick if you want certain IP-addresses to be reached via certain NIC.
(although nowadays it's 'ip route add')
Check: http://www.cyberciti.biz/faq/linux-route-add/

If you should be able to redirect stuff from certain programs, that's different - I don't know how.
 
1 members found this post helpful.
Old 10-11-2014, 10:09 PM   #7
Nogitsune
Member
 
Registered: Oct 2014
Posts: 33

Rep: Reputation: Disabled
Quote:
Originally Posted by turboscrew View Post
'route add' does the trick if you want certain IP-addresses to be reached via certain NIC.
(although nowadays it's 'ip route add')
Check: http://www.cyberciti.biz/faq/linux-route-add/

If you should be able to redirect stuff from certain programs, that's different - I don't know how.
Well after reading a bit more into it, iptables can redirect traffic based on program that initiated it, by using OWNER match.

https://www.frozentux.net/iptables-t...tml#OWNERMATCH

You should then be able to redirect those connections to different output. Again though, a step-by-step would be beyond me without researching further into the matter. But again this would rely on using a different, specific program for email. With evolution mail I think it should be possible. Even with browser it would be possible by installing a different browser intended specifically for email use. That particular browser would then always connect through wireless network.

-- edit --
Sorry, I realized I was kind of going on tangent again, but the bolded parts are my main point. Iptables should be able to do it. Iptables is not a simple program, and probably would require you to recompile kernel with some iptables filtering options enabled. So the solution would be somewhat complicated.. but if done right, I don't see a reason why it wouldn't work.

If you want to pursue this solution though, and aren't very familiar with iptables yourself, your best bet would be to ask from someone who is more familiar with iptables. Using iptables at this level goes beyond basic knowledge.

A more limited, but also more simple, solution would still be to modify the routing tables to use wireless for the specific email servers you use, like pointed out earlier on the thread.

Last edited by Nogitsune; 10-11-2014 at 10:32 PM.
 
1 members found this post helpful.
Old 10-12-2014, 03:44 PM   #8
ramx
LQ Newbie
 
Registered: Aug 2014
Distribution: Debian jessie/sid 64-bit
Posts: 12

Original Poster
Rep: Reputation: Disabled
i would try,


Thanks all


Have nice day.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed - replacing random numbers followed with space and more random chars gluposti Linux - Newbie 7 05-07-2012 07:36 PM
Box is attempting to scan and ssh into random machines using random usernames gianh Linux - Security 2 11-09-2008 05:42 PM
using /dev/random to output random numbers on a text file guguma Programming 4 04-02-2007 01:42 PM
KDE Random wallpaper or script to create symbolic links to random files cvelasquez Linux - Software 2 02-26-2007 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06: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