Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-06-2008, 04:21 PM   #1
Registered: Sep 2004
Location: France, Kentucky
Distribution: debian
Posts: 173

Rep: Reputation: 38
IPTABLES - Invalid argument

I'm trying to redirect anyone who is not authenticated on my network to a different IP address. All authenticated users are assigned an IP address on the network and all of the unauthenticated users are assigned an IP address on the network The DHCP server is working properly and is assigning the IP addresses correctly, but i'm having issues getting the iptables command to work properly.

The commands i'm trying as root:

/sbin/iptables -A PREROUTING -s -p tcp -j DNAT --to-destination

this command is returning

iptables: Invalid argument

my dhcp configuration file looks like this

ddns-updates off;
ddns-update-style interim;
shared-network local {
subnet netmask {
deny unknown-clients;
option routers;
option subnet-mask;
option domain-name-servers ,;
option broadcast-address;
host MacbookPro {
hardware ethernet 00:19:e3:aa:84:aa;
host iPhone {
hardware ethernet 00:1c:b3:aa:a3:aa;
host blacknight {
hardware ethernet 00:14:6c:aa:9a:aa;
subnet netmask {
option routers;
option subnet-mask;
option domain-name-servers;
allow unknown-clients;


any thoughts? thanks
Old 03-06-2008, 06:23 PM   #2
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
Originally Posted by initialdrifteg6 View Post
The commands i'm trying as root:

/sbin/iptables -A PREROUTING -s -p tcp -j DNAT --to-destination

this command is returning

iptables: Invalid argument
(assuming the 255/255/255/0 really is
it most likely returns because there is not PREROUTING chain on the (default) filter table. You probably want to use the nat table.

/sbin/iptables -t nat -A PREROUTING -s -p tcp -j DNAT --to-destination


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
message sending failed : Error[22 ] invalid argument .....but each and every argument rakeshranjanjha Linux - Software 2 01-07-2008 11:22 PM
iptables: Invalid argument pk_kala Linux - Server 4 06-23-2007 02:21 AM
iptables: Invalid argument pk_kala Ubuntu 0 03-15-2007 04:32 AM
Iptables, invalid argument, problem with modprobe ivanatora Linux - Software 1 05-11-2005 05:55 AM
[ Invalid Argument on 'iptables' ] benleung Linux - Security 1 09-23-2003 12:25 AM

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration