amuck-landowner

iptables v1.4.7: Bad IP address "

mtwiscool

New Member
here is my iptables config: http://pastebin.com/ur3LHZii

it gives me this error:

Code:
[root@adamandeve ~]# ./NAT.sh
iptables v1.4.7: Bad IP address "192.168.1.099"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.098"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.097"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.096"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.095"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.094"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.093"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.092"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.091"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.090"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.089"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.088"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.087"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.086"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.085"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.084"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.083"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.082"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.081"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.080"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.079"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.078"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.078"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.069"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.068"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.059"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.058"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.049"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.048"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.039"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.038"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.029"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.028"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.019"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.018"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.009"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.1.008"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.099"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.098"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.097"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.096"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.095"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.094"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.093"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.092"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.091"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.090"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.089"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.088"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.087"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.086"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.085"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.084"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.083"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.082"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.081"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.080"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.079"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.078"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.069"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.068"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.059"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.058"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.049"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.048"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.039"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.038"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.029"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.028"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.019"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.018"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.009"

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.7: Bad IP address "192.168.2.008"

Try `iptables -h' or 'iptables --help' for more information.
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
[root@adamandeve ~]#
 

mtwiscool

New Member
Clearly because of the extra zeroes on the last octet. 192.168.2.008 is an invalid IP, 192.168.2.8 isn't.

And I don't even know anything about iptables. Seriously, if you're already having problems like this... (shudders)
Thank you for your help all errors are gone.

I used the 0's as it should not have any issues as it means the same number.
 

Mun

Never Forget
192.168.2.001 pumped into binary and then back out does not equal 192.168.2.1. Each charcter in binary must be represented in 1s and 0s. As such what you did was make an overflow as you provided more data then the data field could handle.
 

tonyg

New Member
Oh, my...here we go.

Seriously dude, are you going to post every time you have a hiccup?
 
Last edited by a moderator:

drmike

100% Tier-1 Gogent
As long as he's learning and reasonable... we can hold our popcorn in bucketed hand and wait for the main feature.

Friday, coming Friday!
 

Rallias

New Member
cp /etc/sysconfig/iptables.conf /etc/sysconfig/iptables.conf.save; cat /etc/sysconfig/iptables.conf.save | sed 's/\.0/./g' | sed 's/\.0/./g' > /etc/sysconfig/iptables.conf
 

Aldryic C'boas

The Pony
cp /etc/sysconfig/iptables.conf /etc/sysconfig/iptables.conf.save; cat /etc/sysconfig/iptables.conf.save | sed 's/\.0/./g' | sed 's/\.0/./g' > /etc/sysconfig/iptables.conf
Chained seds... that's just nasty.  Your logic needs work, as well.

Let's do that correctly, shall we: cat iptables.conf | perl -ne 's/\.0(0)?(?!$)/\./g; print;' > iptables.conf
 
Last edited by a moderator:

KuJoe

Well-Known Member
Verified Provider
To be honest, I'm sure there are a fair few folk in here who would call themselves providers that wouldn't have known what the problem was or how to fix it.
I'm going to have to disagree here. If you get an error message that says "Bad IP Address" then any reasonable person who's ever logged into a server before should know that the problem is that the IP address is bad. Had he tried to ping the bad IPs before opening this thread, he should have realized that.
 

MartinD

Retired Staff
Verified Provider
Retired Staff
I'm going to have to disagree here. If you get an error message that says "Bad IP Address" then any reasonable person who's ever logged into a server before should know that the problem is that the IP address is bad. Had he tried to ping the bad IPs before opening this thread, he should have realized that.
Joe... I agree, completely.. however I think you missed the point there.. :). There are quite a few folk on here that like to throw mud, having a laugh at other peoples expense however they only do that as they have yet to be caught out. I'm sure a few of us could throw a few names in to the pot of "calls themselves a provider, doesn't really know what they're doing"
 

tonyg

New Member
This happens in "real" life too.

Some people become so dependent on others to solve technical problems that for any small issue they instinctively call out for help.
 
Top
amuck-landowner