This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete lan0 entry | |
>> sudo route del -net 10.0.0.0 netmask 255.0.0.0 | |
# Delete the lan1 entry | |
>> sudo route del -net 10.1.2.0 netmask 255.255.255.0 | |
# Delete the link to rtr2 | |
>> sudo route del -net 10.10.3.0 netmask 255.255.255.0 | |
# Delete the link to rtr1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> sudo iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> cat /proc/sys/net/ipv4/tcp_fin_timeout | |
60 seconds | |
# To change the value | |
>> echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SO_SNDBUF | |
# Cannot exceed maximum size available in kernel config | |
# Kernel config: /proc/sys/net/core/rmem_max | |
212992 | |
# SO_RCVBUF | |
# Cannot exceed maximum size available in kernel config | |
# kernel config: /proc/sys/net/core/wmem_max | |
212992 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Current receiver window size (12Mb) | |
>> sudo su | |
>> echo 'net.ipv4.tcp_rmem= 4096 87380 12582912' >> /etc/sysctl.conf | |
>> sysctl -p | |
# Current sender window size (12Mb) | |
>> sudo su | |
>> echo 'net.ipv4.tcp_rmem= 4096 87380 12582912' >> /etc/sysctl.conf | |
>> sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# current receiver window size | |
>> sysctl -n net.ipv4.tcp_rmem | |
4096 87380 2063584 (2Mb) | |
# current sender window size | |
>> sysctl -n net.ipv4.tcp_wmem | |
4096 87380 2063584 (2Mb) | |
# maximum segment size | |
>> sysctl -n net.ipv4.tcp_app_win |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (Maximum TCP Sender Window) | |
>> /proc/sys/net/ipv4/tcp_wmem | |
4096 16384 4194304 | |
(Maximum TCP Receive Window) | |
>> /proc/sys/net/ipv4/tcp_rmem | |
4096 87380 6291456 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic get request | |
>> curl -v http://www.test.com | |
# Get request with a header | |
>> curl -v http://www.test.com?debug=1 -H "Cookie: Key=Value;” |