• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

otserv + iptables + forward

apterix

New Member
Joined
Oct 27, 2013
Messages
1
Reaction score
0
hey!

I have a problem with iptables+otland:
I have an valid IP on eth1:1 interface and I a started one KVM Virtual Machine with otserv 0.3.6 and invalid IP (i don' t want bridge scheme, because I have firewall).

I used some rules in IPTables to redirect connections from eth1:1 to KVM Virtual Machine.

My rules:

iptables -t nat -I PREROUTING -p tcp -d IPVALIDO --dport 2056 -j DNAT --to-destination 192.168.122.183:2056
iptables -A FORWARD -i eth1:1 -p tcp --dport 2056 -d IPVALIDO -j ACCEPT

iptables -t nat -I PREROUTING -p tcp -d IPVALIDO --dport 7171 -j DNAT --to-destination 192.168.122.183:7171
iptables -A FORWARD -i eth1:1 -p tcp --dport 7171 -d IPVALIDO -j ACCEPT

iptables -t nat -I PREROUTING -p tcp -d IPVALIDO --dport 7172 -j DNAT --to-destination 192.168.122.183:7172
iptables -A FORWARD -i eth1:1 -p tcp --dport 7172 -d IPVALIDO -j ACCEPT

iptables -t nat -I PREROUTING -p tcp -d IPVALIDO --dport 80 -j DNAT --to-destination 192.168.122.183:80
iptables -A FORWARD -i eth1:1 -p tcp --dport 80 -d IPVALIDO -j ACCEPT

iptables -t nat -A POSTROUTING -o eth1:1 -j MASQUERADE
iptables -I FORWARD -m state -d 192.168.122.0/24 --state NEW,RELATED,ESTABLISHED -j ACCEPT

192.168.122.x are my invalid IPs block.

When someone try so connect in 7171, they can list their chars. But when users try to select chars and enter in game (7172 port) nothing happens. OTland was configured with invalid IP.

If i test 7171 and 7172 from telnet, it works!

What am I forgetting? I thinking may be it' s something relationed with otland ports and how his works to use them (otland).
 
Back
Top