Iptables bad argument
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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'
networking bash iptables firewall
 |Â
show 1 more comment
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'
networking bash iptables firewall
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
 |Â
show 1 more comment
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'
networking bash iptables firewall
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'
networking bash iptables firewall
edited May 26 at 13:25
![](https://i.stack.imgur.com/mvyzZ.png?s=32&g=1)
![](https://i.stack.imgur.com/mvyzZ.png?s=32&g=1)
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
 |Â
show 1 more comment
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
 |Â
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Â
draft saved
draft discarded
Â
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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