route traffic of eth0 to eth1
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi
route traffic of eth0 to eth1
Hello All,
I am running a server on two ethernets which can be accessed in all over pakistan. Currently ethernet 0 is configured to entertain users of karachi and Lahore but i need to route users of lahore to ethernet 1 and users of karachi to ethernet0. I have already implemented the ip forward setup but yet no luck. Can any one help.
Regards,
I am running a server on two ethernets which can be accessed in all over pakistan. Currently ethernet 0 is configured to entertain users of karachi and Lahore but i need to route users of lahore to ethernet 1 and users of karachi to ethernet0. I have already implemented the ip forward setup but yet no luck. Can any one help.
Regards,
how do users get to your server?I am running a server on two ethernets which can be accessed in all over pakistan.
assuming you use bind for dns, give ethernet0 one ip address, ethernet1 another ip address, and use views in send traffic from different cities to different ips.Currently ethernet 0 is configured to entertain users of karachi and Lahore but i need to route users of lahore to ethernet 1 and users of karachi to ethernet0.
forward from where to where?I have already implemented the ip forward setup but yet no luck.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi
As i told you i have two ip's, one ip of karachi users and second ip of lahore so i want when ever lahore users click on my domain should go to lahore ip and karachi users when click should go to karachi ip. it is just 2 different ip's.
Further i can see on net that may be iptables can also do this work, further help will be appreciable.
Regards,
Further i can see on net that may be iptables can also do this work, further help will be appreciable.
Regards,
x2oxen wrote:And how you differentiating which user is from karachi and which is from Lahore??
so, it appears that in answer to x2oxen's question, you currently aren't differentiating between users from lahore and karachi.As i told you i have two ip's, one ip of karachi users and second ip of lahore so i want when ever lahore users click on my domain should go to lahore ip and karachi users when click should go to karachi ip. it is just 2 different ip's.
where did you see this? i don't think iptables can do it.Further i can see on net that may be iptables can also do this work, further help will be appreciable.
what you need is a list of networks that isps in lahore use, and a similar list for karachi. you can then use bind views (assuming you use bind for dns, and control the dns server) to direct traffic to whichever ip you want them to connect with.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
geo-targeting scripts use ip address ranges! you can get the list of networks from a geo-targeting script (or site with lists of networks).
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
-
- Site Admin
- Posts: 5132
- Joined: Fri May 02, 2003 10:24 am
- Location: Karachi
- Contact:
Re:
Dear Ghulam Yaseen,
Salam,
I think netfilter geoip patch will also help.
FYI, http://people.netfilter.org/~peejix/geo ... WTO-2.html
Best Regards.
Salam,
I think netfilter geoip patch will also help.
FYI, http://people.netfilter.org/~peejix/geo ... WTO-2.html
Best Regards.
Farrukh Ahmed
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi
Re:
Thanks, this works by your solution Farrukh bhai
LinuxFreaK wrote:Dear Ghulam Yaseen,
Salam,
I think netfilter geoip patch will also help.
FYI, http://people.netfilter.org/~peejix/geo ... WTO-2.html
Best Regards.
-
- Naik
- Posts: 68
- Joined: Thu Aug 07, 2008 6:09 pm
- Location: karachi
Re:
This post is just for all users further knowldge that Netfilter is one way and the other way is using DNS round-robin to use two ip's for one domain for load balancing.
Regards,
Regards,
ghulam yaseen wrote:Thanks, this works by your solution Farrukh bhai
LinuxFreaK wrote:Dear Ghulam Yaseen,
Salam,
I think netfilter geoip patch will also help.
FYI, http://people.netfilter.org/~peejix/geo ... WTO-2.html
Best Regards.
again, look at bind views (tinydns has something similar). you can easily specify what your domain looks like to other people depending on their ip/network.
dns round-robin is something else (and note: doesn't work properly with vista).
dns round-robin is something else (and note: doesn't work properly with vista).
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?