Sign in to follow this  
Dst_lu

Linux Port forwarding

Recommended Posts

Dst_lu    0
Posted (edited)

I have set up a Linux DST dedicated server recently and it works. There is one problem: the ping is not showing any number except ???. I know this has been asked a lot in the past but I have not found much info about the port forwarding on Linux servers. I am not an expert with Linux system but this is what I managed to come up so far:

Spoiler

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
  224 19163 ACCEPT     all  --  lo     any     anywhere             anywhere
    0     0 REJECT     all  --  !lo    any     localhost/8          anywhere             reject-with icmp-port-unreachable
    2   168 ACCEPT     icmp --  any    any     anywhere             anywhere             state NEW icmp echo-request
  166  9892 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:ssh state NEW
    7   300 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http state NEW
    2    80 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:https state NEW
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere             udp spt:10999 dpts:1025:65355
59737 2657K ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED
  209 12789 LOG        all  --  any    any     anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables_INPUT_denied: "
 2246  138K REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-port-unreachable

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 LOG        all  --  any    any     anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables_FORWARD_denied: "
    0     0 REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-port-unreachable
    0     0 ACCEPT     udp  --  any    any     anywhere             **********************.linode.com  udp dpt:65355
    0     0 ACCEPT     udp  --  any    any     anywhere             **********************.linode.com  udp dpt:65355
    0     0 ACCEPT     udp  --  any    any     anywhere             **********************.linode.com  udp dpts:1025:65355
    0     0 ACCEPT     udp  --  any    any     anywhere             **********************.linode.com  udp dpts:1025:65355

 

The command I used was:
 

Spoiler

sudo iptables -D INPUT 7 -p udp --sport 10999 --dport 1025:65355 -j ACCEPT

iptables -A PREROUTING -t nat -i eth0 -p udp --sport 10999 -j DNAT --to*.**.***.*:1025:65355
iptables -A FORWARD -p udp -d 45.79.76.114 --dport 1025:65355 -j ACCEPT

Any comments on how I could make the Ping to show up as a real number?

Thanks.

Edited by Dst_lu

Share this post


Link to post
Share on other sites

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

Sign in to follow this