LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Closed Thread
 
Search this Thread
Old 02-18-2003, 11:35 AM   #1
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
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..
 
Old 02-18-2003, 02:35 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,791
Blog Entries: 54

Rep: Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980
Aren't you missing rules on the FORWARD chain?
Did you check here under the Iptables section for examples?
 
Old 02-18-2003, 03:02 PM   #3
ferreter
Member
 
Registered: Oct 2002
Location: USA, IL
Distribution: Debian/Gentoo/Slack
Posts: 215

Rep: Reputation: 30
Don't forget,

echo 1 > /proc/sys/net/ipv4/ip_forward
 
Old 02-18-2003, 03:22 PM   #4
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Original Poster
Rep: Reputation: 46
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....
 
Old 02-18-2003, 03:46 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,791
Blog Entries: 54

Rep: Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980Reputation: 2980
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.
 
  


Closed Thread


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
Custom FDI Rule Needed - Any Help Much Appreciated rrrssssss Mandriva 0 12-03-2005 04:51 AM
help with iptables rule!! vishamr2000 Linux - Security 6 11-09-2005 06:34 AM
IPTables Rule... Grim Reaper Linux - Software 8 04-28-2003 01:20 PM
iptables rule order dunkyb Linux - Security 2 03-21-2003 08:56 AM
IPTABLES rule file (need help) chris200t Linux - Networking 5 11-11-2002 03:33 PM


All times are GMT -5. The time now is 12:28 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration