Help using iptables for port forwarding

Completed Posted Feb 28, 2015 Paid on delivery
Completed Paid on delivery

In our school I have a machine with a public IP address and a few ports in the 3000 to 3020 range open. That machine has both an ethernet port (eth0) and a wifi port(wlan0). I can ssh into that machine with the public ip address, and once logged in I can ssh into other machines that are on the wifi network.

What I would like to do is using port forwarding to permit me to type from the internet: ssh username"at"[login to view URL] -p 3011 and have port forward ssh into the wifi connected machine like username"at"[login to view URL]

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 3011 -j DNAT --to [login to view URL]

iptables -A INPUT -p tcp -m state --state NEW --dport 3011 -i eth1 -j ACCEPT

iptables -A PREROUTING -t nat -i eth1 -p tcp --source EXTERNALIP --dport 3011 -j DNAT --to [login to view URL]

Where EXTERNALIP is the public IP address. Note that I don't reference wlan0 (perhaps I should?). In any case I have looked at many tutorials and don't know what I am doing wrong. I suspect my error is very simple.

I can either give you a sudo user and password on the machines to experiment or you can tell me what I should try during a chat.

Please respond with your experience and the time we can chat. I will award the job quickly, give maximum radiing, and pay immediately upon success to someone who obviously knows how to resolve this.

Linux

Project ID: #7223768

About the project

6 proposals Remote project Active Feb 28, 2015

Awarded to:

chuchvara

I can solve your problem using teamviewer or direct ssh connection to your server. The duration of this work is between 10-30 min. I have a big experience of doing such job as i`m an ISP administrator. It will be conve More

$12 USD in 1 day
(13 Reviews)
4.1

6 freelancers are bidding on average $23 for this job

amcorreia

A proposal has not yet been provided

$30 USD in 1 day
(88 Reviews)
6.1
xielessupport

I'm David from Xieles Support. We have done many server setup which includes web service, mail service, DNS service. Xieles Support has been in server administration and technical support industry for the last 6 yea More

$30 USD in 1 day
(16 Reviews)
3.5
GRAPT

Hello there, I'm a Web Developer and Dev Ops, I can do it easilly. Please contact me, Best Regards, Guilherme Almeida

$30 USD in 0 days
(1 Review)
0.8
victorinov

I could resolve the issue. I can correct the iptables line to make them work correctly. It will take about half of an hour.

$25 USD in 1 day
(0 Reviews)
0.0
ginkoas

I can solve your problem. To do this I need: 1)List of internal IP-addresses to forward ports 2)External interface name (interface on main machine with internet) 3)SSH access to main machine

$10 USD in 1 day
(0 Reviews)
0.0