Advertisement

06.10.2003 at 01:49AM PDT, ID: 20642728
[x]
Attachment Details

iptables port forward

Asked by saikit in Linux Network Security

Tags: iptables, port, forward

I want to forward all port 80 to a internal server, but can't make it work.  My config are as follows:

The iptables server:
eth0 : 2xx.xxx.xxx.37
eth0 : 2xx.xxx.xxx.38 (alias)
eth1 : 192.168.0.1

iptables commands that I had run:
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -d 2xx.xxx.xxx.38 --dport 80 -j DNAT --to 192.168.0.2

The internal server:
eth0: 192.168.0.2
eth0: 2xx.xxx.xxx.38 (alias)
gateway: 192.168.0.1

Ping from outside (my home) to 2xx.xxx.xxx.37 or 2xx.xxx.xxx.38 (Office) are okay.


What's missing/wrong? Please advise. Thanks. :)Start Free Trial
[+][-]06.11.2003 at 10:06AM PDT, ID: 8701430

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2003 at 09:26AM PDT, ID: 8750546

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.22.2003 at 09:52AM PDT, ID: 8776353

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2003 at 04:18PM PDT, ID: 8809422

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2003 at 10:37AM PDT, ID: 8815025

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Network Security
Tags: iptables, port, forward
Sign Up Now!
Solution Provided By: XoF
Participating Experts: 5
Solution Grade: A
 
 
[+][-]06.27.2003 at 12:08PM PDT, ID: 8815734

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2003 at 01:28PM PDT, ID: 8816258

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2003 at 09:22AM PDT, ID: 8828751

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.30.2003 at 09:28AM PDT, ID: 9037603

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.09.2004 at 01:58PM PDT, ID: 12021378

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32