Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an virtual box freebsd 9.0 installation, on which I have working moinmoin2.0. Moin works on 127.0.0.1:8080 and I want to get access by external IP, e.g. 192.168.1.145:80. I try to use the following command:

natd -interface em0 -redirect_port tcp 127.0.0.1:8080 192.168.1.145:80

But when I try to connect to the server with browser I don't get a responce.

root@Test1:/root # ipfw show

00050 248008 248454273 divert 8668 ip4 from any to any via em0
00100      0         0 allow ip from any to any via lo0
00200      0         0 deny ip from any to 127.0.0.0/8
00300      0         0 deny ip from 127.0.0.0/8 to any
00400      0         0 deny ip from any to ::1
00500      0         0 deny ip from ::1 to any
00600      0         0 allow ipv6-icmp from :: to ff02::/16
00700      0         0 allow ipv6-icmp from fe80::/10 to fe80::/10
00800      0         0 allow ipv6-icmp from fe80::/10 to ff02::/16
00900      0         0 allow ipv6-icmp from any to any ip6 icmp6types 1
01000      0         0 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136
65000 247962 248451849 allow ip from any to any
65535    248    327141 allow ip from any to any
share|improve this question

1 Answer 1

If you assign an IP to FreeBSD visible from other machines (VM's or Host) you should be able to ping it and test connectivity.

If it has no connectivity, it's probably only visible to VirtualBox. Browse in VirtualBox network settings and change the VM network (host-only worked for me). Then restart network to get new ip.

If you do have connectivity, check firewall settings and allow incoming port 80 connections.

Then yes, apply the redirect rule (which will redirect something like 127.0.0.1:80 incoming traffic to 127.0.0.1:8080)

If you need to access from other computer on the same physical network you can configure port forwarding in VirtualBox Settings.

Can't help you much with the redirection, but hope my hints solve.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.