LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Reply
  Search this Thread
Old 03-09-2005, 04:36 PM   #1
zahoo
Member
 
Registered: Nov 2004
Location: EU, HUNGARY, Budapest
Distribution: Debian SID
Posts: 40

Rep: Reputation: 15
Simple IPTABLES problem


Hi,

I got a simple IPTABLES rule question. I want to redirect the incoming 80 port (of a specific IP address) to the port 22 of my router what is happen to be a linux box (debian).

This is my rule line (someone wrote me before in this forum):

iptables -t nat -A PREROUTING -i eth1 -s 192.168.0.7 -p tcp --dport 80 -j REDIRECT --to-ports 22

But when I want to enable it I got this error message:

"iptables: No chain/target/match by that name"

If I comment it out everything is fine all my other rules are running perfectly.


The eth1 is the interface of my internal newtwork (my subnet).

I got another interface (eth0 what is also the ppp0 since I'm using PPPoE connection).


Thanks!


Zahoo
 
Old 03-09-2005, 04:52 PM   #2
calebsg
LQ Newbie
 
Registered: Nov 2001
Posts: 13

Rep: Reputation: 0
I believe that error refers to the PREROUTING part of your statement. But I stand to be corrected.

Caleb
 
Old 03-09-2005, 10:43 PM   #3
jspaar
Member
 
Registered: Feb 2004
Location: California
Posts: 99

Rep: Reputation: 15
Is the iptable_nat module loaded? Check with:
$ lsmod | grep iptable_nat
iptable_nat 23301 0

If so, does the nat table have a PREROUTING chain? Check with:
$ sudo iptables -t nat --list
 
  


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 ipchains Simple Guide.... ziox Linux - Security 8 09-07-2004 09:07 PM
iptables problem in a very simple script max_sipos Linux - Security 2 08-10-2004 07:58 AM
simple Iptables line enrique_arong Linux - Networking 1 06-09-2004 08:14 AM
Simple enough...iptables..port forwarding pembo13 Linux - Networking 4 07-19-2003 03:08 AM
Simple iptables help- Newbie ldahn Linux - Networking 3 03-06-2003 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:49 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