Raised This Month: $51 Target: $400
 12% 

Two ISP on one srcds?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 04-01-2018 , 23:22   Two ISP on one srcds?
Reply With Quote #1

Is it possbible to bind one SRCDS on the both WAN interfaces? I've two ISP and wanna to bind my public on both WAN IP adresses.. SRCDS over nat, physically servers' IP it's a local address. I use dst-nat for the adress translation from wan to lan and lan to wan. Connection established, ports opened on both WAN interfaces(via routing) but srcds can't reserve both wan addresses..

Quote:
Connection to Steam servers successful.
Public IP is WAN2
or

Quote:
Connection to Steam servers successful.
Public IP is WAN1
But never I can't see it on both interfaces. crap :\

Last edited by ZASTRELIS; 04-01-2018 at 23:29.
ZASTRELIS is offline
Zuby24
Member
Join Date: Apr 2017
Location: Romania/Bucharest
Old 04-02-2018 , 02:29   Re: Two ISP on one srcds?
Reply With Quote #2

Sure it works, but you need to forward cs:go ports from IP2 to IP1
__________________

Last edited by Zuby24; 04-02-2018 at 02:33.
Zuby24 is offline
Zuby24
Member
Join Date: Apr 2017
Location: Romania/Bucharest
Old 04-02-2018 , 02:31   Re: Two ISP on one srcds?
Reply With Quote #3

Example of script:
Code:
#!/bin/bash
LANG=C; LC_ALL=C; export LANG LC_ALL
clear


################################################
#################CONFIGURATION##################
# Path to iptables
IPTABLES='/sbin/iptables'

`$IPTABLES -F; $IPTABLES -X`

`$IPTABLES -t nat -A PREROUTING -p udp --dport 51840 -j DNAT --to-destination IP2:51840`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 51840 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 3306 -j DNAT --to-destination IP2:3306`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 3306 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 12679 -j DNAT --to-destination IP2:12679`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 12679 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 30033 -j DNAT --to-destination IP2:30033`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 30033 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 10044 -j DNAT --to-destination IP2:10044`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 10044 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 10045 -j DNAT --to-destination IP2:10044`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 10045 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27015 -j DNAT --to-destination IP2:27015`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27015 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27016 -j DNAT --to-destination IP2:27016`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27016 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27017 -j DNAT --to-destination IP2:27017`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27017 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27005 -j DNAT --to-destination IP2:27005`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27005 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27005 -j DNAT --to-destination IP2:27005`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27005 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27018 -j DNAT --to-destination IP2:27018`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27018 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 27019 -j DNAT --to-destination IP2:27019`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 27019 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27015 -j DNAT --to-destination IP2:27015`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27015 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27016 -j DNAT --to-destination IP2:27016`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27016 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27017 -j DNAT --to-destination IP2:27017`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27017 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27018 -j DNAT --to-destination IP2:27018`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27018 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 27019 -j DNAT --to-destination IP2:27019`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 27019 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p tcp --dport 28015 -j DNAT --to-destination IP2:28015`
`$IPTABLES -t nat -A POSTROUTING -p tcp -d IP2 --dport 28015 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 20020 -j DNAT --to-destination IP2:20020`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 20020 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A PREROUTING -p udp --dport 1337 -j DNAT --to-destination IP2:1337`
`$IPTABLES -t nat -A POSTROUTING -p udp -d IP2 --dport 1337 -j SNAT --to-source IP1`
`$IPTABLES -t nat -A POSTROUTING -j MASQUERADE`

# Always allow loopback
`$IPTABLES -A INPUT -i lo -j ACCEPT`

# Allow Local connections
`$IPTABLES -A INPUT -s 127.0.0.1 -j ACCEPT`

# Allow 3 way handshake
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Save for reboot
iptables-save > /etc/redirect.conf
echo "#!/bin/sh" > /etc/network/if-up.d/iptables
echo "iptables-restore < /etc/redirect.conf" >> /etc/network/if-up.d/iptables
chmod +x /etc/network/if-up.d/iptables

echo "IP2 to IP1 Redirect ----- SUCCS!"

# End script
exit 0
You need to replace IP2 and IP1 with your ip's
__________________

Last edited by Zuby24; 04-02-2018 at 02:34.
Zuby24 is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 04-02-2018 , 04:42   Re: Two ISP on one srcds?
Reply With Quote #4

I understood. But one problem, I use a mikrotik :\ Topology of this looks like: "WAN1" -> connection marked as "WAN1_conn", then route marked as "to_WAN1" of connection is "WAN1_conn" then routed table switch flow to the static route "WAN1" where to_WAN1 looks xD I don't understand nothing! But two days in ROS and it works fine. And this two days and at end of them where I can understood that problem. This problem not in IPS balancing or NAt or something else, the problem it's a SRCDS and I know how fix it, but can't do that on mikrotik ROS ((((((((

Last edited by ZASTRELIS; 04-02-2018 at 10:39.
ZASTRELIS is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-03-2018 , 11:28   Re: Two ISP on one srcds?
Reply With Quote #5

No, SRCDS doesn't have support for either multiple bind addresses nor multiple public addresses.
__________________
asherkin is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 04-05-2018 , 10:13   Re: Two ISP on one srcds?
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
No, SRCDS doesn't have support for either multiple bind addresses nor multiple public addresses.
it's I already understood
ZASTRELIS is offline
xkonsole
AlliedModders Donor
Join Date: Mar 2018
Old 04-05-2018 , 13:38   Re: Two ISP on one srcds?
Reply With Quote #7

You actually don't even need a srcds on the other host. Just a set of dst-nat/netmap actions.
xkonsole is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 04-27-2018 , 00:08   Re: Two ISP on one srcds?
Reply With Quote #8

1ISP netmap, 2ISP with dst-nat or using manual redirection from 2ISP to ROS gateaway then from gw-ROS to local servers' addrr
ZASTRELIS is offline
Reply



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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode