LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2005, 07:33 PM   #1
mchitrakar
Member
 
Registered: Mar 2004
Posts: 93
Blog Entries: 1

Rep: Reputation: 15
iptables prob


iptables man page says there is option for "--to-destination" for DNAT...
but iptables in my comp doesnt accept it and gives error
as:

pitables v1.2.7a; Unknown arg '--to-destination'. try iptables -h ...for more informations


this has confused me. any suggestions?
 
Old 12-16-2005, 09:09 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Generally, arguments dependent upon another argument must come after that other argument. For example, in this case, you'd need '-j DNAT' before the '--to-destination'.
 
Old 12-17-2005, 07:36 PM   #3
mchitrakar
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Blog Entries: 1

Rep: Reputation: 15
the cmd i used is:
iptables -t nat -I PREROUTING -p tcp -d 203.78.160.242 --dport 80 -j REDIRECT --to 192.168.0.12
but still it did not occur...
 
Old 12-17-2005, 07:38 PM   #4
mchitrakar
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Blog Entries: 1

Rep: Reputation: 15
oops...even cmd :

iptables -t nat -I PREROUTING -p tcp -d 203.78.160.242 --dport 80 -j REDIRECT --to-destination 192.168.0.12

--???
 
Old 12-18-2005, 12:39 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You can't use --to-destination with -j REDIRECT. As the man page says, --to-destination is only valid with the 'BALANCE' and 'DNAT' targets. -j REDIRECT redirects to the LOCAL machine only, and as such, is only capable of changing ports.
 
  


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
iptables prob in /var/log/messages globeTrotter Linux - Networking 9 11-17-2004 03:02 PM
iptables prob in /var/log/messages pt3 globeTrotter Linux - Networking 5 11-12-2004 12:43 PM
iptables script prob Neomaster Linux - Networking 5 06-07-2003 07:01 PM
prob with iptables sandy Linux - Networking 1 04-14-2003 03:08 PM
iptables mobile users prob hirschma Linux - Security 1 09-13-2001 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:48 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
Open Source Consulting | Domain Registration