The online racing simulator
Searching in All forums
(2 results)
Raga
Demo licensed
Its only my fault when making description to code.
Server port is 63392 and forwared its 63392 too.

Hm, can you check is your port visible by: http://www.canyouseeme.org
when your server is running?

EDIT:
Now is working, the port forwarding generator was mixing local with WAN interfaces.
I just had to change FORWARD and PREROUTING interfaces from eth0 (local) to eth1 (WAN)
Last edited by Raga, .
Port Forwarding IPTABLES, problems and questions.
Raga
Demo licensed
Hello,
My computer where I run LFS is behind a Linux Debian router.
I have there iptables firewall.


eth1 - Internet interface
G_NET_IP - IP Adress I got from ISP
L_NET_NAME="eth0" - LAN interface
192.168.0.2 - computer where I run LFS Server.
63292 - server port

#ACCEPT FORWARDING (LFS)
iptables -A FORWARD -p udp -i eth1 --destination-port 63392 --destination 192.168.0.2 -j ACCEPT
iptables -A FORWARD -p tcp -i eth1 --destination-port 63392 --destination 192.168.0.2 -j ACCEPT

#PREROUTING PORT FORWARD (LFS)
iptables -t nat -A PREROUTING -p udp -i $L_NET_NAME --destination-port 63392 --destination $G_NET_IP -j DNAT --to-destination 192.168.0.2:63392
iptables -t nat -A PREROUTING -p tcp -i $L_NET_NAME --destination-port 63392 --destination $G_NET_IP -j DNAT --to-destination 192.168.0.2:63392

On my firewal I dont need to accept The outgoing TCP, beacuse alll my outgoing TCPs are ACCEPTED.

Still got problem with connecting my friend to my server.

My question is should CanYouSeeMe.org - Open Port Check Tool see my service running, when I have server running?
http://www.canyouseeme.org/
RESULT: Error: I could not see your service on $G_NET_IP on port (63392)
Reason: Connection refused

The Windows Firewall is disabled on my computer.

EDIT:
iptables -t nat -L gives me:
hostname - my hostname.

Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT udp -- anywhere hostname udp dpt:63392 to:192.168.0.2:63392
DNAT tcp -- anywhere hostname tcp dpt:63392 to:192.168.0.2:63392

Last edited by Raga, . Reason : Changing: "63292 - server port" to "63392 - server port"
FGED GREDG RDFGDR GSFDG