LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2013, 01:45 AM   #1
jitendra.sharma
Member
 
Registered: Mar 2013
Location: ahmedabad
Distribution: CentOS, Ubuntu, Debian
Posts: 92
Blog Entries: 1

Rep: Reputation: Disabled
routing with two interface via iptables


I have apache server on CentOS-5.4 hosting webmail pages on 172.16.0.254. there are two network interface etho(172.16.0.254) and eth1 (192.168.1.111).
i want to access webmail with eth1 network client ip 192.168.1.10..
how can i route my packates on server using iptables 192.168.1.0/24 network to 172.16.0.0/16........then i can access http://172.168.0.254/webmail with client 192.168.1.111.

Thanks,
Regards,
Jitendra.Sharma
 
Old 04-30-2013, 10:15 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Is the server presently acting as a router between your LAN and the internet (WAN)? What happens (details, please; no 'doesn't work' descriptions) when your LAN client tries to access your server using the WAN interface URL's? Can you access the webmail service on your server by using LAN URLs?

In my vision, you want to set up the server as a router (I prefer HomeLanSecurity to configure that) between the WAN and LAN sides. Then, configure the LAN clients to use the router as the gateway to the WAN side (method varies somewhat depending on the LAN client OS). That should do it. You can consolidate all of this into one tidy config file for all LAN hosts by using DHCP on the LAN.

--- rod.
 
Old 04-30-2013, 12:12 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,954

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by jitendra.sharma View Post
I have apache server on CentOS-5.4 hosting webmail pages on 172.16.0.254. there are two network interface etho(172.16.0.254) and eth1 (192.168.1.111).
i want to access webmail with eth1 network client ip 192.168.1.10..
how can i route my packates on server using iptables 192.168.1.0/24 network to 172.16.0.0/16........then i can access http://172.168.0.254/webmail with client 192.168.1.111.
Amazingly similar to another of your threads:
http://www.linuxquestions.org/questi...es-4175454169/

Did you read about iptables? If so, you can APPLY what you learned, since you've already been given the solution....
 
  


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
Routing from src IP to new interface Biederony Linux - Networking 6 12-09-2012 12:30 PM
iptables: All routing on any interface seems to stop when a rule for wlan0 is added iwonbigbro Linux - Security 4 10-11-2012 10:23 AM
iptables -L does not show in-interface or out-interface? forbin Linux - Security 3 02-28-2011 12:16 AM
routing traffic from one interface to another a550ee Linux - Networking 0 07-08-2007 04:28 PM
Iptables / routing to destination address through interface Xeta Linux - Networking 7 05-10-2006 04:17 PM


All times are GMT -5. The time now is 09:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration