# [SOLVED]Access Static IP from gentoo xen domU

## webbruno

Hi all,

I'm trying to set up my domU to have access to my public static IPs provided by my ISP. I've followed the Gentoo Home Router Guide to configure the dnsmasq and iptables and the other computers on my network are working just fine, but since then my other 3 gentoo xen domU can not get an address the way they usually did.

Here goes my configuration

/etc/conf.d/net

```

dns_servers="XXX.XX.XX.2 XXX.XX.XX.3"

config_eth1="10.0.0.101 broadcast 10.0.0.255 netmask 255.255.255.0"

bridge_xenbr0="eth0"

config_xenbr0="XXX.XX.XXX.170 broadcast XXX.XX.XXX.175 netmask 255.255.255.248"

routes_xenbr0="default gw XXX.XX.XXX.169"

```

/etc/dnsmasq.conf

```

interface=eth1

dhcp-range=10.0.0.100,10.0.0.250,72h

```

/sbin/iptables -L -v

```
Chain INPUT (policy ACCEPT 15958 packets, 22M bytes)

 pkts bytes target     prot opt in     out     source               destination         

   29  2248 ACCEPT     all  --  lo     any     anywhere             anywhere            

 3979  350K ACCEPT     all  --  eth1   any     anywhere             anywhere            

   28  9388 REJECT     udp  --  !eth1  any     anywhere             anywhere             udp dpt:bootps reject-with icmp-port-unreachable

    0     0 REJECT     udp  --  !eth1  any     anywhere             anywhere             udp dpt:domain reject-with icmp-port-unreachable

    0     0 ACCEPT     tcp  --  xenbr0 any     anywhere             anywhere             tcp dpt:ssh

    8   408 DROP       tcp  --  !eth1  any     anywhere             anywhere             tcp dpts:0:1023

    0     0 DROP       udp  --  !eth1  any     anywhere             anywhere             udp dpts:0:1023

Chain FORWARD (policy DROP 230 packets, 47574 bytes)

 pkts bytes target     prot opt in     out     source               destination         

    0     0 DROP       all  --  eth1   any     anywhere             10.0.0.0/16         

22667 3379K ACCEPT     all  --  eth1   any     10.0.0.0/16          anywhere            

25715   25M ACCEPT     all  --  xenbr0 any     anywhere             10.0.0.0/16         

Chain OUTPUT (policy ACCEPT 13485 packets, 1369K bytes)

 pkts bytes target     prot opt in     out     source               destination   

```

All my domU uses dhcp to fetch an address, which means they don't have any configuration on theirs /etc/conf.d/net. I'd like them to have public IPs What am I doing wrong? or What else should I do? Thanks

----------

## webbruno

Ok,

By disabling netfilter on sysctl.conf as described [url=here]http://wiki.xen.org/wiki/Network_Configuration_Examples_(Xen_4.1%2B)[/url] my domU could get my static public IP. There's only one thing now, one particularly domU (The most important, where I host my application used by my entire company) must have a internal ip, which means it has to be in the 255.255.255.0 netmask. How can I achieve that now?

----------

## webbruno

Ok!

I solved my problem by creating two bridges! Now everything is working as it should!

----------

