1

ENVIRONMENT

Azure VM Ubuntu 18 has: 2 NICs. NIC #1: has 2 public IPs.

  • Private IPS: 10.0.0.4, 10.0.0.5 NIC #2: has one public IP.
  • Private IP: 10.0.0.6

OBJECTIVE

How do i ultimately create a HTTP transparent squid proxy on each public IP?

I've tried http_proxy <PROXY1..3>:3128 tcp_outgoing_address in squid.conf and more.

  • Editing http_proxy <PROXY1..3>:3128 into the squid.conf weirdly makes every private and public ip proxy return the primary IP on the first NIC (curl -x icanhazip.com)

Troubleshooting

using curl to verify IP connectivity

(in my mind verifying curl connectivity is prerequisite to squid)

Why I can't access my 3rd public IP on the eth1 NIC via 10.0.0.6? I try to use curl --interface 10.0.0.6 http://ifconfig.me, but it doesn't work. It times out. Subnetting overlap issue?

  • Unlike the squid connecivity, using basic curl interface parameter, .04 & .05 (NIC 1's private IPs) yield correct respective Public IPs.

QUESTIONS I HAVE

More specifically, what should I be focusing on debugging? Routing, netplan? Is there infrastructure (ie. NIC, Public IP configuration) within Azure's Web Portal that must be configured accurately that may not be amendable by linux commands? (Bar firewall/nsg of course)

Do I need NAT? (idk what that is yet)

BASH OUTPUT OF IP CONFS

azureadmin@vm-eastus:~$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default _gateway 0.0.0.0 UG 100 0 0 eth0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 20.127.192.206 vm-eastus 255.255.255.255 UGH 0 0 0 eth1 168.63.129.16 _gateway 255.255.255.255 UGH 100 0 0 eth0 169.254.169.254 _gateway 255.255.255.255 UGH 100 0 0 eth0 azureadmin@vm-eastus:~$ ip route show default via 10.0.0.1 dev eth0 proto dhcp src 10.0.0.4 metric 100 10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.5 10.0.0.0/24 dev eth1 proto kernel scope link src 10.0.0.6 20.127.192.206 via 10.0.0.6 dev eth1 src 10.0.0.6 168.63.129.16 via 10.0.0.1 dev eth0 proto dhcp src 10.0.0.4 metric 100 169.254.169.254 via 10.0.0.1 dev eth0 proto dhcp src 10.0.0.4 metric 
azureadmin@vm-eastus:~$ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::20d:3aff:fe1a:f68 prefixlen 64 scopeid 0x20<link> ether 00:0d:3a:1a:0f:68 txqueuelen 1000 (Ethernet) RX packets 178788 bytes 68220395 (68.2 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 185586 bytes 44971107 (44.9 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.6 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::20d:3aff:fe1a:415 prefixlen 64 scopeid 0x20<link> ether 00:0d:3a:1a:04:15 txqueuelen 1000 (Ethernet) RX packets 354 bytes 28907 (28.9 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 37 bytes 3012 (3.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 9812 bytes 962775 (962.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9812 bytes 962775 (962.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 
(new instance btw - same startup config tho) azureadmin@vm-eastus:/etc/netplan$ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 60:45:bd:d2:e8:6f brd ff:ff:ff:ff:ff:ff inet 10.0.0.5/24 brd 10.0.0.255 scope global eth0 valid_lft forever preferred_lft forever inet 10.0.0.4/24 brd 10.0.0.255 scope global secondary eth0 valid_lft forever preferred_lft forever inet6 fe80::6245:bdff:fed2:e86f/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 60:45:bd:d2:e0:77 brd ff:ff:ff:ff:ff:ff inet 10.0.0.6/24 brd 10.0.0.255 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::6245:bdff:fed2:e077/64 scope link valid_lft forever preferred_lft forever 

I was able to setup 1 VM w/ 2 Public IP proxies on DigitalOcean, but Azure somehow has me stumped. Any help is appreciated, Thank you :)

1
  • Do you have a Public IP for 10.0.0.6 to use when going outside Azure? It is likely that only your primary interface would have such thing. Commented Jan 24 at 15:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.