Jump to content

Question

Posted

i need to setup proxy

 

 iptables -t nat -A PREROUTING -p tcp --dport 2106 -j DNAT --to-destination xxx.xxx.xxx.xxx:2106
 iptables -t nat -A PREROUTING -p tcp --dport 7777 -j DNAT --to-destination xxx.xxx.xxx.xxx:7777

in the .ini there is only

 

Proxy = 

 

any clue? is my 1st time using this config, im used to set up common way for login

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

It's additional proxy or you just have server behind NAT and need port forwarding?

 

If it's just port forwarding, you don't need anything else than DNAT and enabling IPv4 forwarding

sysctl net.ipv4.ip_forward=1

Also packets from server must go back through the proxy (it must be default gateway for the server)

 

 

If it's real proxy (another server endpoint):

 

http://www.maxcheaters.com/topic/206180-patched-hauth-to-support-multiple-ip-addressesproxies/?hl=hauthd

 

Also you'll have to learn something about policy-based routing because when you have two endpoints, server will still send packets via default gateway - which will be your primary IP address. So if packet comes to l2server via proxy, it must go back to client via the very same proxy - not via default gateway.

 

You should read something about it (google linux policy based routing), this can help you a bit:

 

On router:

 

Mark incoming packets and restore mark for outgoing packets:

 

iptables -t mangle -A PREROUTING -i tun0 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 100 # mark packets from 1st proxy
iptables -t mangle -A PREROUTING -i tun1 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 101 # mark packets from 2nd proxy
iptables -t mangle -A PREROUTING -i tun2 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 102 # mark packets from 3rd proxy
iptables -t mangle -A PREROUTING -i br1 -p tcp -m tcp --sport 7777 -j CONNMARK --restore-mark # restore mark on packets going back
Use policy-based routing based on packet mark:
 
ip rule add fwmark 100 table 100 # if packet is marked as from 1st proxy, use routing table 100
ip route add default via 10.8.0.1 table 100 # routing table 100 - default gateway is 1st proxy internal address
ip rule add fwmark 101 table 101 # if packet is marked as from 2nd proxy, use routing table 101
ip route add default via 10.8.1.1 table 101 # routing table 101 - default gateway is 2nd proxy internal address
ip rule add fwmark 102 table 102 # if packet is marked as from 3rd proxy, use routing table 102
ip route add default via 10.8.2.1 table 102 # routing table 102 - default gateway is 3rd proxy internal address
On proxy:
 
up iptables -t nat -A PREROUTING -m tcp -p tcp --dport 7777 -j DNAT --to-destination 10.8.0.2:7777
Edited by eressea
  • 0
Posted (edited)

 

It's additional proxy or you just have server behind NAT and need port forwarding?

 

If it's just port forwarding, you don't need anything else than DNAT and enabling IPv4 forwarding

sysctl net.ipv4.ip_forward=1

Also packets from server must go back through the proxy (it must be default gateway for the server)

 

 

If it's real proxy (another server endpoint):

 

http://www.maxcheaters.com/topic/206180-patched-hauth-to-support-multiple-ip-addressesproxies/?hl=hauthd

 

Also you'll have to learn something about policy-based routing because when you have two endpoints, server will still send packets via default gateway - which will be your primary IP address. So if packet comes to l2server via proxy, it must go back to client via the very same proxy - not via default gateway.

 

You should read something about it (google linux policy based routing), this can help you a bit:

 

On router:

 

Mark incoming packets and restore mark for outgoing packets:

 

iptables -t mangle -A PREROUTING -i tun0 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 100 # mark packets from 1st proxy
iptables -t mangle -A PREROUTING -i tun1 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 101 # mark packets from 2nd proxy
iptables -t mangle -A PREROUTING -i tun2 -p tcp -m tcp --dport 7777 -j CONNMARK --set-mark 102 # mark packets from 3rd proxy
iptables -t mangle -A PREROUTING -i br1 -p tcp -m tcp --sport 7777 -j CONNMARK --restore-mark # restore mark on packets going back
Use policy-based routing based on packet mark:
 
ip rule add fwmark 100 table 100 # if packet is marked as from 1st proxy, use routing table 100
ip route add default via 10.8.0.1 table 100 # routing table 100 - default gateway is 1st proxy internal address
ip rule add fwmark 101 table 101 # if packet is marked as from 2nd proxy, use routing table 101
ip route add default via 10.8.1.1 table 101 # routing table 101 - default gateway is 2nd proxy internal address
ip rule add fwmark 102 table 102 # if packet is marked as from 3rd proxy, use routing table 102
ip route add default via 10.8.2.1 table 102 # routing table 102 - default gateway is 3rd proxy internal address
On proxy:
 
up iptables -t nat -A PREROUTING -m tcp -p tcp --dport 7777 -j DNAT --to-destination 10.8.0.2:7777

 

yes atm im behind 2 routers and i want to set also few login gateways for better ping from different locations

by now i must fwd ports on router 1 and router 2

in comming weeks i will add the other thing when i get direct conection to wan ip

Edited by etherian

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • (3241-100)/9 = 349 online xD     WHAT I WILL SEE ON NEW SEASON ? *Free VIP characters for everyone for first 3 days after opening ! Unique augmentation trade/sell system (NEW PATCH V3.2). Improved server stability. No more lagg / dc. Pvp map area HIDE Names/clans unique system. Big changes on augmentation system.  rotfl Lucky fortune monsters on levelling area with 10min spawn. Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD Increased giran trading area for sell. New raid boss events in coliseum. Fixed reflect damage skills. New raid boss banshee. Fixed pvp area flag issues. Fixed castle siege pray issues. New pvp map in sea of spores. Increased all mob drops rate by +20%. And much more...   Augment diammond 100% 3x winter xDD   And now the best part   HAHAHAH 1-10 random level LS Augment Also we will try to push longer seasons ever !  HAHAHAHAHAHA XD   GRAND START FROM - 15/08/2025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 10/10/2025, FRIDAY, 20:00 +3 GRAND OPENING FROM - 05 DECEMBER 2025, FRIDAY, 20:00 +2 GMT ! GRAND OPENING FROM - 12/052025, FRIDAY, 20:00 +3 GMT ! GRAND OPENING FROM - 23 JANUARY 2026, FRIDAY, 20:00 +2 GMT ! WIPE ! NEW SEASON GRAND OPENING FROM TODAY ! - 23/01/2026, FRIDAY, 20:00 +3 GMT ! OPENING TODAY !!! FROM - 06/03/2026, FRIDAY, 20:00 +3 GMT !   1. When wipe?  2. When will there be any response to the allegations? 3. When will they stop deceiving players with the actual number of players online? 4. When change server name to L2][Wipe the best waste Time][Money?
    • Don't spam my post again. Do you need attention? That guy doesn't work at L2Devs, he's not a programmer, and I've never spoken to him. You should respond to the people you scammed. Regards!
    • “WRONG EMAIL – AND EVERYTHING FALLS APART.” ▪ Requests are different. Sometimes a task takes three days, sometimes thirty minutes. ▪ Recently a regular client contacted us. The account had one e-mail, but another one was required for a specific service. ▪ The screenshot was sent immediately. Task – carefully replace the e-mail in the document so that everything looks natural and leaves no editing traces. ▪ Small details like this are often underestimated. › What usually happens: – one symbol in the e-mail doesn’t match – the system starts checking metadata – questions appear about the file origin – the document goes to additional verification ▪ We simply did it properly: the e-mail matches, the file structure remained intact, the document looks original. ▪ Sometimes a good result is not “magic”, but precision in details. ▪ If your document were checked right now – are you sure there are no small details that could ruin everything? › TG: https://t.me/mustang_service ( https:// t.me/ mustang_service ) › Channel: https://t.me/+JPpJCETg-xM1NjNl ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documentdesign #verification #documents #case #antifraud
    • Skylord  = L2Gold.eu ;   Skylord is the programmer at L2Devs. Look what he posted in my thread. I reported him, and they automatically deleted his post and closed my thread.   They need to trick people into buying this garbage.   You can safely use this extender:   https://maxcheaters.com/topic/253977-%F0%9F%94%A5-l2ext-custom-interlude-vang-%E2%80%93-2026-release/  
    • 💙 PRIDE ESSENCE X1  ✅ Start: 14.03.2026  ✅ UPDATE: SAMURAI CROW  ✅ ONLINE: 2000+  💜 NO P2W / BIG CLANS / INTERNATIONAL COMMUNITY / STAGE SYSTEM  🎮 Discord bonus: https://discord.gg/prideessence Pride Essence Official Server Wiki Here you can find all features, systems, and detailed information to fully understand the server.   - General Features - https://prideessence.club/general-features - Road Map - https://prideessence.club/roadmap/ - Class Balance – 14/03 - https://prideessence.club/class-balance-14-03/ - Referral System - https://prideessence.club/referral-system/ - Party Synergy System - https://prideessence.club/party-synergy-system/ - Dual Class System - https://prideessence.club/dual-class-system-3/ - Premium Account - https://prideessence.club/premium-account/ - Game Store - https://prideessence.club/game-store/ - L-Coin Store - https://prideessence.club/l-coin-store/ - Command Channel Skill Availability - https://prideessence.club/command-channel-skill-availability/ - Clan DKP System - https://prideessence.club/clan-dkp-system/ - Target Priority System - https://prideessence.club/target-priority-system/ - Skins - https://prideessence.club/skins/ - Players Inspect - https://prideessence.club/players-inspect/ - Gear Score Ranking - https://prideessence.club/gear-score-ranking/ - Guaranteed Enchant System - https://prideessence.club/guaranteed-enchant-system/ - Account Shield - https://prideessence.club/account-shield/ - VIP Level Ranking - https://prideessence.club/vip-level-ranking/ - Tournament - https://prideessence.club/tournament-2/ - Fortress Siege - https://prideessence.club/fortress-siege/ - Olympiad - https://prideessence.club/olympiad/ - Enchant and Compound Limit - https://prideessence.club/enchant-and-compound-limit/ - Enchant Rates - https://prideessence.club/enchant-rates/ - Pride World Marketplace - https://prideessence.club/pride-world-marketplace/ - Raid Boss Lootbox - https://prideessence.club/raid-boss-lootbox/
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..