LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-11-2012, 10:32 AM   #1
xirtyllo
LQ Newbie
 
Registered: Oct 2009
Location: Netherlands
Distribution: Slackware 13
Posts: 23

Rep: Reputation: 0
Post 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

Last edited by xirtyllo; 10-11-2012 at 10:34 AM.
 
Old 10-12-2012, 02:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,372

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
well the very point of the \ is to permit the line break. just remove it.
 
1 members found this post helpful.
Old 10-12-2012, 09:03 AM   #3
xirtyllo
LQ Newbie
 
Registered: Oct 2009
Location: Netherlands
Distribution: Slackware 13
Posts: 23

Original Poster
Rep: Reputation: 0
great, thank you!
 
  


Reply

Tags
firewall, iptables, slackware, slackware 14


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add rule to iptables on login. paranoid times Linux - Software 3 02-23-2010 07:04 PM
how can i add rtp protocol to my iptables rule of netfilter hdinn Linux - Newbie 1 07-30-2009 07:12 PM
how can i add the rtp protocol to my iptables rule hdinn Linux - Networking 1 07-29-2009 12:29 PM
iptables problem after del add a rule oknets10 Linux - Networking 4 03-24-2008 04:13 AM
Add temporary rule to Iptables rickh Linux - Security 3 03-04-2008 10:10 AM


All times are GMT -5. The time now is 01:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration