Skip to contentSkip to conversation

confusion with dport and sport

DISCUSSION J. Bakshi 2 participants 2 messages Sep 3, 2009

lore
Share & tools
lore

J. Bakshi

author
#0 lore raw

Hello,

I have found that TOS is helpful for traffic shaping. But some guide use --sport where other use --dport the handle the same thing hence I am very confusd !!
To get a good response from the ssh running on a remote server the rule can be placed in the remote server can be

``````````````````
iptables -t mangle -A PREROUTING -p tcp --dport  $SSH_PORT -j TOS
--set-tos Minimize-Delay
`````````````````````

BUT some site do the same by replacing --dport to --sport

Which one should be the right value ? Please enlighten me. Thanks

#1 lore raw
Quoted 13 lines · J. Bakshi

Hello,

I have found that TOS is helpful for traffic shaping. But some guide use --sport where other use --dport the handle the same thing hence I am very confusd !!
To get a good response from the ssh running on a remote server the rule can be placed in the remote server can be

``````````````````
iptables -t mangle -A PREROUTING -p tcp --dport  $SSH_PORT -j TOS
--set-tos Minimize-Delay
`````````````````````
Quoted 10 lines

BUT some site do the same by replacing --dport to --sport

Which one should be the right value ? Please enlighten me. Thanks
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--dport is used for destination port for which it refers to packets coming up to your gateway/pc destined for a specific port, and --sport is used for source port for which it refers to packets going out from your pc destined for that port.

Signature · 3 lines
Abhishek Singh
FOSS Nepal Community
http://wiki.fossnepal.org