LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   routing with two interface via iptables (https://www.linuxquestions.org/questions/linux-newbie-8/routing-with-two-interface-via-iptables-4175460107/)

jitendra.sharma 04-30-2013 12:45 AM

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

theNbomr 04-30-2013 09:15 AM

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.

TB0ne 04-30-2013 11:12 AM

Quote:

Originally Posted by jitendra.sharma (Post 4941625)
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....


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