LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   iptables : how do I add this rule? (http://www.linuxquestions.org/questions/linux-newbie-8/iptables-how-do-i-add-this-rule-4175431692/)

xirtyllo 10-11-2012 10:32 AM

iptables : how do I add this rule?
 
I would like to add the following iptables command to my /etc/rc.d/rc.firewall (i use Slackware 14)

Code:

iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \ -j TCPMSS --clamp-mss-to-pmtu
the problem is: I noticed that if I simply copy all the code and execute from a shell (as root), it will give an error saying:
Bad argument ` -j'
to make this command work from the shell I have to do
first:
Code:

iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
and then:
Code:

-j TCPMSS --clamp-mss-to-pmtu
Now the question is: how can I write it in a way that I can execute it from my /etc/rc.d/rc.firewall? what should I write?



Background info:

I want to set up the firewall script with this rule, because I have problems with the internet connection at home (only at home and only from my Linux laptop, the Windows laptop has no problems).
And with this rule the problems seem to disappear.
More info here: http://cateee.net/lkddb/web-lkddb/NE...ET_TCPMSS.html


Thank you for any input :hattip:

acid_kewpie 10-12-2012 02:46 AM

well the very point of the \ is to permit the line break. just remove it.

xirtyllo 10-12-2012 09:03 AM

great, thank you!


All times are GMT -5. The time now is 06:39 AM.