LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Verify this rule please. Iptables help needed.. (https://www.linuxquestions.org/questions/linux-networking-3/verify-this-rule-please-iptables-help-needed-45992/)

Pcghost 02-18-2003 10:35 AM

Verify this rule please. Iptables help needed..
 
I am attempting to forward all tcp connections on port 5631 and udp connections on port 5632 to an internal ip. This is my rule. Should this work, or am I missing something?

iptables -t nat -A PREROUTING -p tcp --dport 5631 -j DNAT to 192.168.0.5:5631

iptables -t nat -A PREROUTING -p udp --dport 5632 -j DNAT to 192.168.0.5:5632


Thanks.. :newbie:

unSpawn 02-18-2003 01:35 PM

Aren't you missing rules on the FORWARD chain?
Did you check here under the Iptables section for examples?

ferreter 02-18-2003 02:02 PM

Don't forget,

echo 1 > /proc/sys/net/ipv4/ip_forward

Pcghost 02-18-2003 02:22 PM

Well I got port 25 working (forwarded). I have a thread started in networking about my inability to get the others working. I was missing the Forward rules. I have them now but they don't work..
Anyone wishing to help me please see my post in networking.
Thanks for everything people, you rule....:)

unSpawn 02-18-2003 02:46 PM

I would like to caution you you have opened 3 consecutive threads about the same subject in a very short timespan. I think this borders on bad netiquette. Please either stay with one thread and build it up, or rephrase/refine your question next time.

I'll close the two preceding the one in /networking.


All times are GMT -5. The time now is 11:08 AM.