Iptables bad argument

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I'm writing an iptables Bash script, and I can't figure out why I get the below error:



Variables



iptables=/sbin/iptables
internet_int=ens33
lan_int=ens37
lan_addr=172.16.30.0/24


Rule



#lan -> internet HTTP (80/tcp)
$iptables -A FORWARD -p TCP -i $lan_int -s $lan_addr --sport 1024:65535 -o $internet_int -m multiport --dports 80,443 -m state --state NEW -j ACCEPT


Problem



Bad argument `172.16.30.0/24'






share|improve this question






















  • That exact command works fine for me.
    – Doug Smythies
    May 26 at 13:44










  • I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
    – 91378246
    May 26 at 13:47











  • i don't know what to say. The syntax looks correct, and indeed works for me.
    – Doug Smythies
    May 26 at 13:55










  • The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
    – Doug Smythies
    May 26 at 14:10










  • Nope, double checked it...
    – 91378246
    May 26 at 14:20














up vote
0
down vote

favorite












I'm writing an iptables Bash script, and I can't figure out why I get the below error:



Variables



iptables=/sbin/iptables
internet_int=ens33
lan_int=ens37
lan_addr=172.16.30.0/24


Rule



#lan -> internet HTTP (80/tcp)
$iptables -A FORWARD -p TCP -i $lan_int -s $lan_addr --sport 1024:65535 -o $internet_int -m multiport --dports 80,443 -m state --state NEW -j ACCEPT


Problem



Bad argument `172.16.30.0/24'






share|improve this question






















  • That exact command works fine for me.
    – Doug Smythies
    May 26 at 13:44










  • I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
    – 91378246
    May 26 at 13:47











  • i don't know what to say. The syntax looks correct, and indeed works for me.
    – Doug Smythies
    May 26 at 13:55










  • The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
    – Doug Smythies
    May 26 at 14:10










  • Nope, double checked it...
    – 91378246
    May 26 at 14:20












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm writing an iptables Bash script, and I can't figure out why I get the below error:



Variables



iptables=/sbin/iptables
internet_int=ens33
lan_int=ens37
lan_addr=172.16.30.0/24


Rule



#lan -> internet HTTP (80/tcp)
$iptables -A FORWARD -p TCP -i $lan_int -s $lan_addr --sport 1024:65535 -o $internet_int -m multiport --dports 80,443 -m state --state NEW -j ACCEPT


Problem



Bad argument `172.16.30.0/24'






share|improve this question














I'm writing an iptables Bash script, and I can't figure out why I get the below error:



Variables



iptables=/sbin/iptables
internet_int=ens33
lan_int=ens37
lan_addr=172.16.30.0/24


Rule



#lan -> internet HTTP (80/tcp)
$iptables -A FORWARD -p TCP -i $lan_int -s $lan_addr --sport 1024:65535 -o $internet_int -m multiport --dports 80,443 -m state --state NEW -j ACCEPT


Problem



Bad argument `172.16.30.0/24'








share|improve this question













share|improve this question




share|improve this question








edited May 26 at 13:25









Stephen Rauch

1,1545716




1,1545716










asked May 26 at 13:15









91378246

11




11











  • That exact command works fine for me.
    – Doug Smythies
    May 26 at 13:44










  • I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
    – 91378246
    May 26 at 13:47











  • i don't know what to say. The syntax looks correct, and indeed works for me.
    – Doug Smythies
    May 26 at 13:55










  • The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
    – Doug Smythies
    May 26 at 14:10










  • Nope, double checked it...
    – 91378246
    May 26 at 14:20
















  • That exact command works fine for me.
    – Doug Smythies
    May 26 at 13:44










  • I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
    – 91378246
    May 26 at 13:47











  • i don't know what to say. The syntax looks correct, and indeed works for me.
    – Doug Smythies
    May 26 at 13:55










  • The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
    – Doug Smythies
    May 26 at 14:10










  • Nope, double checked it...
    – 91378246
    May 26 at 14:20















That exact command works fine for me.
– Doug Smythies
May 26 at 13:44




That exact command works fine for me.
– Doug Smythies
May 26 at 13:44












I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
– 91378246
May 26 at 13:47





I get this: root@fw:/home/toor# bash ipt.template start Starting Firewall... Bad argument '172.16.30.0/24' Try `iptables -h' or 'iptables --help' for more information.
– 91378246
May 26 at 13:47













i don't know what to say. The syntax looks correct, and indeed works for me.
– Doug Smythies
May 26 at 13:55




i don't know what to say. The syntax looks correct, and indeed works for me.
– Doug Smythies
May 26 at 13:55












The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
– Doug Smythies
May 26 at 14:10




The only thing I can think of is line termination. Could there be a carriage return and line feed character at the end of the line (dos type) instead of just unix type line termination, line feed?
– Doug Smythies
May 26 at 14:10












Nope, double checked it...
– 91378246
May 26 at 14:20




Nope, double checked it...
– 91378246
May 26 at 14:20















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040591%2fiptables-bad-argument%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040591%2fiptables-bad-argument%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error