-   Linux - Newbie (
-   -   iptables : how do I add this rule? (

xirtyllo 10-11-2012 11: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)


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

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

-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:

Thank you for any input :hattip:

acid_kewpie 10-12-2012 03:46 AM

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

xirtyllo 10-12-2012 10:03 AM

great, thank you!

All times are GMT -5. The time now is 11:59 AM.