I am currently set up a Ubuntu server as a Router which has two network interface.

  • eth0 -> Connecting to public internet ( )
  • eth0:1 ->
  • eth0:2 ->
  • eth0:3 ->

  • eth1 ->

And on the eth1, it connected to a switch, and the switch connected 2 computer. The corresponding ipaddress is :

  • Instance1 ->
  • Instance2 ->

The network mask is and gateway all set to

The ubuntu already setup dns server and dhcp server. When i login to instance1 in the private, i already can access the internet and ping google.com.

For now, I need to do one thing. I want to Instance1 expose to outer network by public address Can I set some rule to redirect all incoming traffic from router with Destination url to private network

Many thanks!


Problem solved by setting rule in the iptable with Destination NAT for protocol is TCP/UDP and destination is your public ip. in Network address transaction setting.

  • 1
    Post an answer with your solution and get credit! – Karl Richter Feb 7 '16 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.