View previous topic :: View next topic |
Author |
Message |
id10t Tux's lil' helper
Joined: 18 May 2002 Posts: 100
|
Posted: Fri Aug 22, 2003 2:12 pm Post subject: iptables error for nat/masq |
|
|
Hi all...
When I tried setting up my old firewall script (I use gShield from muse.linuxmafia.org), the iptable command to start masq/nat results in a "iptables - invalid argument" output to my console. The exact same script works fine in my Slack 8.1 install (dual boot between slack and gentoo), and I'm using the exact same kernel .config (vanilla 2.4.21 sources) as my Slack install.
Any ideas? My wife is getting kinda perturbed about not being able to get online _________________ ---
this space for rent |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Fri Aug 22, 2003 3:19 pm Post subject: |
|
|
You need to determine which is the offending rule. Try entering the rules manually and/or use the -v option to increase verbosity. _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
Decibels Veteran
Joined: 16 Aug 2002 Posts: 1623 Location: U.S.A.
|
Posted: Fri Aug 22, 2003 11:20 pm Post subject: |
|
|
I made some changes recently in my firewall script (hadn't for awhile and that is why hadn't noticed the change), but I was re-enabling masq for my other box and kept getting the same thing.
Little fuzzy on the details now. But in my script I had to add this line:
Code: | /etc/init.d/iptables save |
Before that I would just 'restart' it would save the rules, then restart. That apparently stopped working with the new /etc/init.d/iptables script. Before doing that I was having "iptables - invalid argument" lines pop up for masq.
So added the above line, then the restart and working fine now. |
|
Back to top |
|
|
id10t Tux's lil' helper
Joined: 18 May 2002 Posts: 100
|
Posted: Sat Aug 23, 2003 1:52 am Post subject: |
|
|
OK, I did a iptables-save > working on my Slack install, chrooted over to my gentoo install, and when I try to do a iptables-restore < working, I get
iptables-restore: line 7 failed
Line 7 is: -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o ppp0 -j MASQUERADE
Just for grins I also emerged firestarter, and I get the same error from my original post, again on the line that sets up nat/masq.
Any ideas as to why ? _________________ ---
this space for rent |
|
Back to top |
|
|
asterism n00b
Joined: 19 Aug 2003 Posts: 5
|
Posted: Sat Aug 23, 2003 2:29 am Post subject: |
|
|
Try going back to iptables-1.2.7a-r4 if you are not already using that version.
I had a similar problem as you did with 1.2.8-r1. It didn't grok my NAT commands. (Also wouldn't compile against the 2.6 sources.)
Hope this Helps |
|
Back to top |
|
|
Decibels Veteran
Joined: 16 Aug 2002 Posts: 1623 Location: U.S.A.
|
Posted: Sat Aug 23, 2003 2:30 am Post subject: |
|
|
id10t wrote: | OK, I did a iptables-save > working on my Slack install, chrooted over to my gentoo install, and when I try to do a iptables-restore < working, I get
iptables-restore: line 7 failed |
I couldn't get iptables-save to work either. I thought maybe because of the new section in /etc/init.d/iptables that it might work now, but that isn't the case. Only
Code: | /etc/init.d/iptables save |
worked. |
|
Back to top |
|
|
id10t Tux's lil' helper
Joined: 18 May 2002 Posts: 100
|
Posted: Sat Aug 23, 2003 3:50 am Post subject: |
|
|
Fixed. Removing and re-emerging the iptables-1.2.7a-r4 ebuild specifically did it. _________________ ---
this space for rent |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Mon Feb 09, 2004 5:38 pm Post subject: |
|
|
Moving from Networking and Security.
Please follow up to iptables invalid argument..
There are a great number of threads that are essentially dupes of this topic, so if you feel that something in this thread should go in the sticky thread, please re-post it there or provide a link back here. As always, please PM a moderator if you feel this thread is significantly different than any other thread and was inadvertently locked.
Thanks to nephros for pointing out the dupes.
_________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
|