How to connect a jail to the web ?
Brice ERRANDONEA
berrandonea at yahoo.fr
Thu Aug 12 14:35:41 UTC 2010
Here they are.
On the host, when the jail is not running :
%ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:11:09:15:72:6a
inet 192.168.1.38 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:11:06:99:8a:ff
ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
lladdr 0.11.6.66.0.99.8a.ff.a.2.ff.fe.0.0.0.0
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
%netstat -rnfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGS 16 434 rl0
127.0.0.1 link#5 UH 0 20 lo0
192.168.1.0/24 link#1 U 1 98 rl0
192.168.1.38 link#1 UHS 0 0 lo0
On the host when the jail is running :
FreeBSD# jls
JID IP Address Hostname Path
1 93.0.168.242 MaPrison /usr/prison
FreeBSD# ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:11:09:15:72:6a
inet 192.168.1.38 netmask 0xffffff00 broadcast 192.168.1.255
inet 93.0.168.242 netmask 0xffffffff broadcast 93.0.168.242
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:11:06:99:8a:ff
ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
lladdr 0.11.6.66.0.99.8a.ff.a.2.ff.fe.0.0.0.0
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
FreeBSD# netstat -rnfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGS 0 474 rl0
93.0.168.242 link#1 UHS 0 20 lo0 =>
93.0.168.242/32 link#1 U 0 0 rl0
127.0.0.1 link#5 UH 0 20 lo0
192.168.1.0/24 link#1 U 0 102 rl0
192.168.1.38 link#1 UHS 0 0 lo0
In the jail (running, of course) :
FreeBSD# jexec 1 ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:11:09:15:72:6a
inet 93.0.168.242 netmask 0xffffffff broadcast 93.0.168.242
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:11:06:99:8a:ff
ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
lladdr 0.11.6.66.0.99.8a.ff.a.2.ff.fe.0.0.0.0
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
FreeBSD# jexec 1 netstat -rnfinet
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.1 UGS 0 480 rl0
93.0.168.242 link#1 UHS 0 20 lo0 =>
93.0.168.242/32 link#1 U 0 0 rl0
127.0.0.1 link#5 UH 0 20 lo0
192.168.1.0/24 link#1 U 0 102 rl0
192.168.1.38 link#1 UHS 0 0 lo0
Do you find what's wrong ?
Brice
________________________________
De : Oliver Fromme <olli at lurza.secnetix.de>
À : freebsd-questions at FreeBSD.ORG; berrandonea at yahoo.fr
Envoyé le : Jeu 12 août 2010, 14h 52min 00s
Objet : Re: Re : How to connect a jail to the web ?
Brice ERRANDONEA <berrandonea at yahoo.fr> wrote:
> 192.168.1.38 is the private address of rl0 on my host. 93.0.168.242 is the
> public one. I tried both as the jail's address. With the private one, neither
> portsnap nor ping work at all.
>
> With the public one, I get this result :
> [...]
> FreeBSD# jexec 2 ping www.yahoo.fr
> ping: cannot resolve www.yahoo.fr: Host name lookup failure
> FreeBSD# jexec 2 ping 69.147.83.33
> PING 69.147.83.33 (69.147.83.33): 56 data bytes
> [...]
> 32 packets transmitted, 0 packets received, 100.0% packet loss
Please show the _complete_ output from "ifconfig" and "netstat -rnfinet".
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
PI:
int f[9814],b,c=9814,g,i;long a=1e4,d,e,h;
main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a)
while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}
_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list