Skip to content

Commit

Permalink
Change P2P port to 7951
Browse files Browse the repository at this point in the history
  • Loading branch information
David B committed Aug 25, 2018
1 parent 55b0bbf commit 8f5c651
Show file tree
Hide file tree
Showing 10 changed files with 605 additions and 605 deletions.
2 changes: 1 addition & 1 deletion contrib/qos/README.md
@@ -1,5 +1,5 @@
### Qos ###

This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the MegaCoin network. It limits outbound TCP traffic with a source or destination port of 8555, but not if the destination IP is within a LAN (defined as 192.168.x.x).
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the MegaCoin network. It limits outbound TCP traffic with a source or destination port of 7951, but not if the destination IP is within a LAN (defined as 192.168.x.x).

This means one can have an always-on megacoind instance running, and another local megacoind/megacoin-qt instance which connects to this node and receives blocks from it.
6 changes: 3 additions & 3 deletions contrib/qos/tc.sh
Expand Up @@ -36,10 +36,10 @@ tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
# ret=$?
#done

#limit outgoing traffic to and from port 8555. but not when dealing with a host on the local network
#limit outgoing traffic to and from port 7951. but not when dealing with a host on the local network
# (defined by $LOCALNET)
# --set-mark marks packages matching these criteria with the number "2"
# these packages are filtered by the tc filter with "handle 2"
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8555 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8555 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 7951 ! -d ${LOCALNET} -j MARK --set-mark 0x2
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 7951 ! -d ${LOCALNET} -j MARK --set-mark 0x2
2 changes: 1 addition & 1 deletion contrib/rpm/megacoin.spec
Expand Up @@ -352,7 +352,7 @@ fi
if [ $1 -eq 0 ]; then
if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
%{_sbindir}/semanage port -d -p tcp 9332
%{_sbindir}/semanage port -d -p tcp 8555
%{_sbindir}/semanage port -d -p tcp 7951
%{_sbindir}/semanage port -d -p tcp 19332
%{_sbindir}/semanage port -d -p tcp 19333
for selinuxvariant in %{selinux_variants}; do
Expand Down
2 changes: 1 addition & 1 deletion contrib/seeds/generate-seeds.py
Expand Up @@ -127,7 +127,7 @@ def main():
g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
g.write(' */\n')
with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_main', 8555)
process_nodes(g, f, 'pnSeed6_main', 7951)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_test', 19335)
Expand Down

0 comments on commit 8f5c651

Please sign in to comment.